diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-06-23 22:47:18 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-06-23 22:47:18 +0800 |
commit | d12bc3fbd3a34b8bcf8a6d7c23815f5a79dec49d (patch) | |
tree | f44cbdfb0f9d68c8e25381c2af3be36b06a1bc79 /embed/mozilla | |
parent | 451c3366a26cfe58deda5000102ffaf6e7efa6bf (diff) | |
download | gsoc2013-epiphany-d12bc3fbd3a34b8bcf8a6d7c23815f5a79dec49d.tar gsoc2013-epiphany-d12bc3fbd3a34b8bcf8a6d7c23815f5a79dec49d.tar.gz gsoc2013-epiphany-d12bc3fbd3a34b8bcf8a6d7c23815f5a79dec49d.tar.bz2 gsoc2013-epiphany-d12bc3fbd3a34b8bcf8a6d7c23815f5a79dec49d.tar.lz gsoc2013-epiphany-d12bc3fbd3a34b8bcf8a6d7c23815f5a79dec49d.tar.xz gsoc2013-epiphany-d12bc3fbd3a34b8bcf8a6d7c23815f5a79dec49d.tar.zst gsoc2013-epiphany-d12bc3fbd3a34b8bcf8a6d7c23815f5a79dec49d.zip |
Move check for javascript after the http[s] checks.
2004-06-23 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/GlobalHistory.cpp:
Move check for javascript after the http[s] checks.
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/GlobalHistory.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/embed/mozilla/GlobalHistory.cpp b/embed/mozilla/GlobalHistory.cpp index 6be4c2a37..4e44a409f 100644 --- a/embed/mozilla/GlobalHistory.cpp +++ b/embed/mozilla/GlobalHistory.cpp @@ -48,11 +48,7 @@ NS_IMETHODIMP MozGlobalHistory::AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aT NS_ENSURE_ARG (aURI); - PRBool isJavascript; - rv = aURI->SchemeIs("javascript", &isJavascript); - NS_ENSURE_SUCCESS(rv, rv); - - if (isJavascript || aRedirect || !aToplevel) + if (aRedirect || !aToplevel) { return NS_OK; } @@ -73,15 +69,16 @@ NS_IMETHODIMP MozGlobalHistory::AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aT if (!isHTTP && !isHTTPS) { - PRBool isAbout, isViewSource, isChrome, isData; + PRBool isJavascript, isAbout, isViewSource, isChrome, isData; - rv = aURI->SchemeIs("about", &isAbout); + rv = aURI->SchemeIs("javascript", &isJavascript); + rv |= aURI->SchemeIs("about", &isAbout); rv |= aURI->SchemeIs("view-source", &isViewSource); rv |= aURI->SchemeIs("chrome", &isChrome); rv |= aURI->SchemeIs("data", &isData); NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE); - if (isAbout || isViewSource || isChrome || isData) + if (isJavascript ||isAbout || isViewSource || isChrome || isData) { return NS_OK; } |