Bug 617838: Don't run the URI classifier on javascript: URIs. r=bz a=a
authorChris Jones <jones.chris.g@gmail.com>
Tue, 04 Jan 2011 10:40:54 -0600
changeset 59845 d3e7baf00c962551a16b87c011d9d2781ecd5875
parent 59844 94d5e1a68f55b8d698677a6b86c7eb816a6dbc8a
child 59846 d4084c318c9ee870bf6eb5b08f3a9f635034c404
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersbz, a
bugs617838
milestone2.0b9pre
Bug 617838: Don't run the URI classifier on javascript: URIs. r=bz a=a
dom/src/jsurl/nsJSProtocolHandler.cpp
--- a/dom/src/jsurl/nsJSProtocolHandler.cpp
+++ b/dom/src/jsurl/nsJSProtocolHandler.cpp
@@ -889,17 +889,22 @@ nsJSChannel::SetLoadFlags(nsLoadFlags aL
         mStreamChannel->GetLoadGroup(getter_AddRefs(loadGroup));
         if (loadGroup) {
             nsLoadFlags loadGroupFlags;
             loadGroup->GetLoadFlags(&loadGroupFlags);
             loadGroupIsBackground = ((loadGroupFlags & LOAD_BACKGROUND) != 0);
         }
         bogusLoadBackground = !loadGroupIsBackground;
     }
-    
+
+    // Classifying a javascript: URI doesn't help us, and requires
+    // NSS to boot, which we don't have in content processes.  See
+    // https://bugzilla.mozilla.org/show_bug.cgi?id=617838.
+    aLoadFlags &= ~LOAD_CLASSIFY_URI;
+
     // Since the javascript channel is never the actual channel that
     // any data is loaded through, don't ever set the
     // LOAD_DOCUMENT_URI flag on it, since that could lead to two
     // 'document channels' in the loadgroup if a javascript: URL is
     // loaded while a document is being loaded in the same window.
 
     // XXXbz this, and a whole lot of other hackery, could go away if we'd just
     // cancel the current document load on javascript: load start like IE does.