Backed out 2 changesets (bug 1191107, bug 1180273) for causing xpcshell and m-oth testfailures on a CLOSED TREEi IGNORE IDL
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 06 Aug 2015 08:39:05 +0200
changeset 289820 365302c182170f31093e1f5f3984511e882099fd
parent 289819 b1e940e0912733ba458eb1770f6f673d5a78f7f2
child 289821 2be4be656c7f7fee3ecd96942b6263d051d8db8d
push id934
push userraliiev@mozilla.com
push dateMon, 26 Oct 2015 12:58:05 +0000
treeherdermozilla-release@05704e35c1d0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1191107, 1180273
milestone42.0a1
backs outc5f710ed8718c44cee5853813a1f3b988317f449
d98d82f9981b2602c94e2b1e40e4916931f67ae0
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 2 changesets (bug 1191107, bug 1180273) for causing xpcshell and m-oth testfailures on a CLOSED TREEi IGNORE IDL Backed out changeset c5f710ed8718 (bug 1191107) Backed out changeset d98d82f9981b (bug 1180273)
b2g/components/MailtoProtocolHandler.js
b2g/components/SmsProtocolHandler.js
b2g/components/TelProtocolHandler.js
dom/base/EventSource.cpp
dom/base/nsContentPolicyUtils.h
dom/base/nsContentUtils.cpp
dom/base/nsIContentPolicyBase.idl
dom/base/nsXMLHttpRequest.cpp
dom/cache/DBSchema.cpp
dom/fetch/InternalRequest.cpp
dom/fetch/InternalRequest.h
dom/xml/XMLDocument.cpp
extensions/permissions/nsContentBlocker.cpp
toolkit/components/places/BookmarkJSONUtils.jsm
toolkit/components/places/nsLivemarkService.js
toolkit/components/search/tests/xpcshell/test_serialize_file.js
toolkit/components/thumbnails/PageThumbsProtocol.js
toolkit/mozapps/extensions/test/browser/browser_openDialog.js
toolkit/mozapps/update/nsUpdateService.js
--- a/b2g/components/MailtoProtocolHandler.js
+++ b/b2g/components/MailtoProtocolHandler.js
@@ -35,16 +35,16 @@ MailtoProtocolHandler.prototype = {
     cpmm.sendAsyncMessage("mail-handler", {
       URI: aURI.spec,
       type: "mail" });
 
     throw Components.results.NS_ERROR_ILLEGAL_VALUE;
   },
 
   newChannel: function Proto_newChannel(aURI) {
-    return this.newChannel2(aURI, null);
+    return newChannel2(aURI, null);
   },
 
   classID: Components.ID("{50777e53-0331-4366-a191-900999be386c}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIProtocolHandler])
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([MailtoProtocolHandler]);
--- a/b2g/components/SmsProtocolHandler.js
+++ b/b2g/components/SmsProtocolHandler.js
@@ -61,16 +61,16 @@ SmsProtocolHandler.prototype = {
         type: "websms/sms",
         body: body });
     }
 
     throw Components.results.NS_ERROR_ILLEGAL_VALUE;
   },
 
   newChannel: function Proto_newChannel(aURI) {
-    return this.newChannel2(aURI, null);
+    return newChannel2(aURI, null);
   },
 
   classID: Components.ID("{81ca20cb-0dad-4e32-8566-979c8998bd73}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIProtocolHandler])
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([SmsProtocolHandler]);
--- a/b2g/components/TelProtocolHandler.js
+++ b/b2g/components/TelProtocolHandler.js
@@ -47,16 +47,16 @@ TelProtocolHandler.prototype = {
         number: number,
         type: "webtelephony/number" });
     }
 
     throw Components.results.NS_ERROR_ILLEGAL_VALUE;
   },
 
   newChannel: function Proto_newChannel(aURI) {
-    return this.newChannel2(aURI, null);
+    return newChannel2(aURI, null);
   },
 
   classID: Components.ID("{782775dd-7351-45ea-aff1-0ffa872cfdd2}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIProtocolHandler])
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TelProtocolHandler]);
--- a/dom/base/EventSource.cpp
+++ b/dom/base/EventSource.cpp
@@ -776,27 +776,27 @@ EventSource::InitChannelAndRequestEventS
 
   nsCOMPtr<nsIChannel> channel;
   // If we have the document, use it
   if (doc) {
     rv = NS_NewChannel(getter_AddRefs(channel),
                        mSrc,
                        doc,
                        securityFlags,
-                       nsIContentPolicy::TYPE_INTERNAL_EVENTSOURCE,
+                       nsIContentPolicy::TYPE_DATAREQUEST,
                        mLoadGroup,       // loadGroup
                        nullptr,          // aCallbacks
                        loadFlags);       // aLoadFlags
   } else {
     // otherwise use the principal
     rv = NS_NewChannel(getter_AddRefs(channel),
                        mSrc,
                        mPrincipal,
                        securityFlags,
-                       nsIContentPolicy::TYPE_INTERNAL_EVENTSOURCE,
+                       nsIContentPolicy::TYPE_DATAREQUEST,
                        mLoadGroup,       // loadGroup
                        nullptr,          // aCallbacks
                        loadFlags);       // aLoadFlags
   }
 
   NS_ENSURE_SUCCESS(rv, rv);
 
   mHttpChannel = do_QueryInterface(channel);
--- a/dom/base/nsContentPolicyUtils.h
+++ b/dom/base/nsContentPolicyUtils.h
@@ -87,50 +87,48 @@ NS_CP_ResponseName(int16_t response)
  *
  * @param contentType the content type code
  * @return the name of the given content type code
  */
 inline const char *
 NS_CP_ContentTypeName(uint32_t contentType)
 {
   switch (contentType) {
-    CASE_RETURN( TYPE_OTHER                   );
-    CASE_RETURN( TYPE_SCRIPT                  );
-    CASE_RETURN( TYPE_IMAGE                   );
-    CASE_RETURN( TYPE_STYLESHEET              );
-    CASE_RETURN( TYPE_OBJECT                  );
-    CASE_RETURN( TYPE_DOCUMENT                );
-    CASE_RETURN( TYPE_SUBDOCUMENT             );
-    CASE_RETURN( TYPE_REFRESH                 );
-    CASE_RETURN( TYPE_XBL                     );
-    CASE_RETURN( TYPE_PING                    );
-    CASE_RETURN( TYPE_XMLHTTPREQUEST          );
-    CASE_RETURN( TYPE_OBJECT_SUBREQUEST       );
-    CASE_RETURN( TYPE_DTD                     );
-    CASE_RETURN( TYPE_FONT                    );
-    CASE_RETURN( TYPE_MEDIA                   );
-    CASE_RETURN( TYPE_WEBSOCKET               );
-    CASE_RETURN( TYPE_CSP_REPORT              );
-    CASE_RETURN( TYPE_XSLT                    );
-    CASE_RETURN( TYPE_BEACON                  );
-    CASE_RETURN( TYPE_FETCH                   );
-    CASE_RETURN( TYPE_IMAGESET                );
-    CASE_RETURN( TYPE_WEB_MANIFEST            );
-    CASE_RETURN( TYPE_INTERNAL_SCRIPT         );
-    CASE_RETURN( TYPE_INTERNAL_WORKER         );
-    CASE_RETURN( TYPE_INTERNAL_SHARED_WORKER  );
-    CASE_RETURN( TYPE_INTERNAL_EMBED          );
-    CASE_RETURN( TYPE_INTERNAL_OBJECT         );
-    CASE_RETURN( TYPE_INTERNAL_FRAME          );
-    CASE_RETURN( TYPE_INTERNAL_IFRAME         );
-    CASE_RETURN( TYPE_INTERNAL_AUDIO          );
-    CASE_RETURN( TYPE_INTERNAL_VIDEO          );
-    CASE_RETURN( TYPE_INTERNAL_TRACK          );
-    CASE_RETURN( TYPE_INTERNAL_XMLHTTPREQUEST );
-    CASE_RETURN( TYPE_INTERNAL_EVENTSOURCE    );
+    CASE_RETURN( TYPE_OTHER                  );
+    CASE_RETURN( TYPE_SCRIPT                 );
+    CASE_RETURN( TYPE_IMAGE                  );
+    CASE_RETURN( TYPE_STYLESHEET             );
+    CASE_RETURN( TYPE_OBJECT                 );
+    CASE_RETURN( TYPE_DOCUMENT               );
+    CASE_RETURN( TYPE_SUBDOCUMENT            );
+    CASE_RETURN( TYPE_REFRESH                );
+    CASE_RETURN( TYPE_XBL                    );
+    CASE_RETURN( TYPE_PING                   );
+    CASE_RETURN( TYPE_XMLHTTPREQUEST         );
+    CASE_RETURN( TYPE_OBJECT_SUBREQUEST      );
+    CASE_RETURN( TYPE_DTD                    );
+    CASE_RETURN( TYPE_FONT                   );
+    CASE_RETURN( TYPE_MEDIA                  );
+    CASE_RETURN( TYPE_WEBSOCKET              );
+    CASE_RETURN( TYPE_CSP_REPORT             );
+    CASE_RETURN( TYPE_XSLT                   );
+    CASE_RETURN( TYPE_BEACON                 );
+    CASE_RETURN( TYPE_FETCH                  );
+    CASE_RETURN( TYPE_IMAGESET               );
+    CASE_RETURN( TYPE_WEB_MANIFEST           );
+    CASE_RETURN( TYPE_INTERNAL_SCRIPT        );
+    CASE_RETURN( TYPE_INTERNAL_WORKER        );
+    CASE_RETURN( TYPE_INTERNAL_SHARED_WORKER );
+    CASE_RETURN( TYPE_INTERNAL_EMBED         );
+    CASE_RETURN( TYPE_INTERNAL_OBJECT        );
+    CASE_RETURN( TYPE_INTERNAL_FRAME         );
+    CASE_RETURN( TYPE_INTERNAL_IFRAME        );
+    CASE_RETURN( TYPE_INTERNAL_AUDIO         );
+    CASE_RETURN( TYPE_INTERNAL_VIDEO         );
+    CASE_RETURN( TYPE_INTERNAL_TRACK         );
    default:
     return "<Unknown Type>";
   }
 }
 
 #undef CASE_RETURN
 
 /* Passes on parameters from its "caller"'s context. */
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -7918,20 +7918,16 @@ nsContentUtils::InternalContentPolicyTyp
   case nsIContentPolicy::TYPE_INTERNAL_IFRAME:
     return nsIContentPolicy::TYPE_SUBDOCUMENT;
 
   case nsIContentPolicy::TYPE_INTERNAL_AUDIO:
   case nsIContentPolicy::TYPE_INTERNAL_VIDEO:
   case nsIContentPolicy::TYPE_INTERNAL_TRACK:
     return nsIContentPolicy::TYPE_MEDIA;
 
-  case nsIContentPolicy::TYPE_INTERNAL_XMLHTTPREQUEST:
-  case nsIContentPolicy::TYPE_INTERNAL_EVENTSOURCE:
-    return nsIContentPolicy::TYPE_XMLHTTPREQUEST;
-
   default:
     return aType;
   }
 }
 
 
 nsresult
 nsContentUtils::SetFetchReferrerURIWithPolicy(nsIPrincipal* aPrincipal,
--- a/dom/base/nsIContentPolicyBase.idl
+++ b/dom/base/nsIContentPolicyBase.idl
@@ -252,30 +252,16 @@ interface nsIContentPolicyBase : nsISupp
 
   /**
    * Indicates an internal constant for content loaded from track elements.
    *
    * This will be mapped to TYPE_MEDIA.
    */
   const nsContentPolicyType TYPE_INTERNAL_TRACK = 32;
 
-  /**
-   * Indicates an internal constant for an XMLHttpRequest.
-   *
-   * This will be mapped to TYPE_XMLHTTPREQUEST.
-   */
-  const nsContentPolicyType TYPE_INTERNAL_XMLHTTPREQUEST = 33;
-
-  /**
-   * Indicates an internal constant for EventSource.
-   *
-   * This will be mapped to TYPE_DATAREQUEST.
-   */
-  const nsContentPolicyType TYPE_INTERNAL_EVENTSOURCE = 34;
-
   /* When adding new content types, please update nsContentBlocker,
    * NS_CP_ContentTypeName, nsCSPContext, all nsIContentPolicy
    * implementations, the static_assert in dom/cache/DBSchema.cpp,
    * and other things that are not listed here that are related to
    * nsIContentPolicy. */
 
   //////////////////////////////////////////////////////////////////////
 
--- a/dom/base/nsXMLHttpRequest.cpp
+++ b/dom/base/nsXMLHttpRequest.cpp
@@ -1706,17 +1706,17 @@ nsXMLHttpRequest::Open(const nsACString&
   }
 
   rv = NS_NewURI(getter_AddRefs(uri), url, nullptr, baseURI);
   if (NS_FAILED(rv)) return rv;
 
   rv = CheckInnerWindowCorrectness();
   NS_ENSURE_SUCCESS(rv, rv);
   int16_t shouldLoad = nsIContentPolicy::ACCEPT;
-  rv = NS_CheckContentLoadPolicy(nsIContentPolicy::TYPE_INTERNAL_XMLHTTPREQUEST,
+  rv = NS_CheckContentLoadPolicy(nsIContentPolicy::TYPE_XMLHTTPREQUEST,
                                  uri,
                                  mPrincipal,
                                  doc,
                                  EmptyCString(), //mime guess
                                  nullptr,         //extra
                                  &shouldLoad,
                                  nsContentUtils::GetContentPolicy(),
                                  nsContentUtils::GetSecurityManager());
@@ -1760,27 +1760,27 @@ nsXMLHttpRequest::Open(const nsACString&
   }
 
   // If we have the document, use it
   if (doc) {
     rv = NS_NewChannel(getter_AddRefs(mChannel),
                        uri,
                        doc,
                        secFlags,
-                       nsIContentPolicy::TYPE_INTERNAL_XMLHTTPREQUEST,
+                       nsIContentPolicy::TYPE_XMLHTTPREQUEST,
                        loadGroup,
                        nullptr,   // aCallbacks
                        nsIRequest::LOAD_BACKGROUND);
   } else {
     //otherwise use the principal
     rv = NS_NewChannel(getter_AddRefs(mChannel),
                        uri,
                        mPrincipal,
                        secFlags,
-                       nsIContentPolicy::TYPE_INTERNAL_XMLHTTPREQUEST,
+                       nsIContentPolicy::TYPE_XMLHTTPREQUEST,
                        loadGroup,
                        nullptr,   // aCallbacks
                        nsIRequest::LOAD_BACKGROUND);
   }
 
   if (NS_FAILED(rv)) return rv;
 
   mState &= ~(XML_HTTP_REQUEST_USE_XSITE_AC |
--- a/dom/cache/DBSchema.cpp
+++ b/dom/cache/DBSchema.cpp
@@ -136,19 +136,17 @@ static_assert(nsIContentPolicy::TYPE_INV
               nsIContentPolicy::TYPE_INTERNAL_WORKER == 24 &&
               nsIContentPolicy::TYPE_INTERNAL_SHARED_WORKER == 25 &&
               nsIContentPolicy::TYPE_INTERNAL_EMBED == 26 &&
               nsIContentPolicy::TYPE_INTERNAL_OBJECT == 27 &&
               nsIContentPolicy::TYPE_INTERNAL_FRAME == 28 &&
               nsIContentPolicy::TYPE_INTERNAL_IFRAME == 29 &&
               nsIContentPolicy::TYPE_INTERNAL_AUDIO == 30 &&
               nsIContentPolicy::TYPE_INTERNAL_VIDEO == 31 &&
-              nsIContentPolicy::TYPE_INTERNAL_TRACK == 32 &&
-              nsIContentPolicy::TYPE_INTERNAL_XMLHTTPREQUEST == 33 &&
-              nsIContentPolicy::TYPE_INTERNAL_EVENTSOURCE == 34,
+              nsIContentPolicy::TYPE_INTERNAL_TRACK == 32,
               "nsContentPolicytType values are as expected");
 
 namespace {
 
 typedef int32_t EntryId;
 
 struct IdCount
 {
--- a/dom/fetch/InternalRequest.cpp
+++ b/dom/fetch/InternalRequest.cpp
@@ -147,22 +147,19 @@ InternalRequest::MapContentPolicyTypeToR
     context = RequestContext::Internal;
     break;
   case nsIContentPolicy::TYPE_XBL:
     context = RequestContext::Internal;
     break;
   case nsIContentPolicy::TYPE_PING:
     context = RequestContext::Ping;
     break;
-  case nsIContentPolicy::TYPE_INTERNAL_XMLHTTPREQUEST:
+  case nsIContentPolicy::TYPE_XMLHTTPREQUEST:
     context = RequestContext::Xmlhttprequest;
     break;
-  case nsIContentPolicy::TYPE_INTERNAL_EVENTSOURCE:
-    context = RequestContext::Eventsource;
-    break;
   case nsIContentPolicy::TYPE_OBJECT_SUBREQUEST:
     context = RequestContext::Plugin;
     break;
   case nsIContentPolicy::TYPE_DTD:
     context = RequestContext::Internal;
     break;
   case nsIContentPolicy::TYPE_FONT:
     context = RequestContext::Font;
--- a/dom/fetch/InternalRequest.h
+++ b/dom/fetch/InternalRequest.h
@@ -55,22 +55,22 @@ namespace dom {
  * prefetch          |
  * script            | TYPE_INTERNAL_SCRIPT
  * sharedworker      | TYPE_INTERNAL_SHARED_WORKER
  * subresource       | Not supported by Gecko
  * style             | TYPE_STYLESHEET
  * track             | TYPE_INTERNAL_TRACK
  * video             | TYPE_INTERNAL_VIDEO
  * worker            | TYPE_INTERNAL_WORKER
- * xmlhttprequest    | TYPE_INTERNAL_XMLHTTPREQUEST
- * eventsource       | TYPE_INTERNAL_EVENTSOURCE
+ * xmlhttprequest    | TYPE_XMLHTTPREQUEST
  * xslt              | TYPE_XSLT
  *
  * TODO: Figure out if TYPE_REFRESH maps to anything useful
  * TODO: Figure out if TYPE_DTD maps to anything useful
+ * TODO: Split TYPE_XMLHTTPREQUEST and TYPE_DATAREQUEST for EventSource
  * TODO: Figure out if TYPE_WEBSOCKET maps to anything useful
  * TODO: Add a content type for prefetch
  * TODO: Use the content type for manifest when it becomes available
  * TODO: Add a content type for location
  * TODO: Add a content type for hyperlink
  * TODO: Add a content type for form
  * TODO: Add a content type for favicon
  * TODO: Add a content type for download
--- a/dom/xml/XMLDocument.cpp
+++ b/dom/xml/XMLDocument.cpp
@@ -343,17 +343,17 @@ XMLDocument::Load(const nsAString& aUrl,
   if (!nsContentUtils::IsSystemPrincipal(principal)) {
     rv = principal->CheckMayLoad(uri, false, false);
     if (NS_FAILED(rv)) {
       aRv.Throw(rv);
       return false;
     }
 
     int16_t shouldLoad = nsIContentPolicy::ACCEPT;
-    rv = NS_CheckContentLoadPolicy(nsIContentPolicy::TYPE_INTERNAL_XMLHTTPREQUEST,
+    rv = NS_CheckContentLoadPolicy(nsIContentPolicy::TYPE_XMLHTTPREQUEST,
                                    uri,
                                    principal,
                                    callingDoc ? callingDoc.get() :
                                      static_cast<nsIDocument*>(this),
                                    NS_LITERAL_CSTRING("application/xml"),
                                    nullptr,
                                    &shouldLoad,
                                    nsContentUtils::GetContentPolicy(),
@@ -440,17 +440,17 @@ XMLDocument::Load(const nsAString& aUrl,
   nsCOMPtr<nsIChannel> channel;
   // nsIRequest::LOAD_BACKGROUND prevents throbber from becoming active,
   // which in turn keeps STOP button from becoming active  
   rv = NS_NewChannel(getter_AddRefs(channel),
                      uri,
                      callingDoc ? callingDoc.get() :
                                   static_cast<nsIDocument*>(this),
                      nsILoadInfo::SEC_NORMAL,
-                     nsIContentPolicy::TYPE_INTERNAL_XMLHTTPREQUEST,
+                     nsIContentPolicy::TYPE_XMLHTTPREQUEST,
                      loadGroup,
                      req,
                      nsIRequest::LOAD_BACKGROUND);
 
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
     return false;
   }
--- a/extensions/permissions/nsContentBlocker.cpp
+++ b/extensions/permissions/nsContentBlocker.cpp
@@ -50,19 +50,17 @@ static const char *kTypeString[] = {
                                     "", // TYPE_INTERNAL_WORKER
                                     "", // TYPE_INTERNAL_SHARED_WORKER
                                     "", // TYPE_INTERNAL_EMBED
                                     "", // TYPE_INTERNAL_OBJECT
                                     "", // TYPE_INTERNAL_FRAME
                                     "", // TYPE_INTERNAL_IFRAME
                                     "", // TYPE_INTERNAL_AUDIO
                                     "", // TYPE_INTERNAL_VIDEO
-                                    "", // TYPE_INTERNAL_TRACK
-                                    "", // TYPE_INTERNAL_XMLHTTPREQUEST
-                                    ""  // TYPE_INTERNAL_EVENTSOURCE
+                                    ""  // TYPE_INTERNAL_TRACK
 };
 
 #define NUMBER_OF_TYPES MOZ_ARRAY_LENGTH(kTypeString)
 uint8_t nsContentBlocker::mBehaviorPref[NUMBER_OF_TYPES];
 
 NS_IMPL_ISUPPORTS(nsContentBlocker, 
                   nsIContentPolicy,
                   nsIObserver,
--- a/toolkit/components/places/BookmarkJSONUtils.jsm
+++ b/toolkit/components/places/BookmarkJSONUtils.jsm
@@ -205,17 +205,17 @@ BookmarkImporter.prototype = {
           }
         }
       };
 
       let uri = NetUtil.newURI(spec);
       let channel = NetUtil.newChannel({
         uri,
         loadingPrincipal: Services.scriptSecurityManager.getNoAppCodebasePrincipal(uri),
-        contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_XMLHTTPREQUEST
+        contentPolicyType: Ci.nsIContentPolicy.TYPE_DATAREQUEST
       });
       let streamLoader = Cc["@mozilla.org/network/stream-loader;1"]
                            .createInstance(Ci.nsIStreamLoader);
       streamLoader.init(streamObserver);
       channel.asyncOpen(streamLoader, channel);
     });
   },
 
--- a/toolkit/components/places/nsLivemarkService.js
+++ b/toolkit/components/places/nsLivemarkService.js
@@ -524,17 +524,17 @@ Livemark.prototype = {
       // Create a load group for the request.  This will allow us to
       // automatically keep track of redirects, so we can always
       // cancel the channel.
       let loadgroup = Cc["@mozilla.org/network/load-group;1"].
                       createInstance(Ci.nsILoadGroup);
       let channel = NetUtil.newChannel({
         uri: this.feedURI.spec,
         loadingPrincipal: Services.scriptSecurityManager.getNoAppCodebasePrincipal(this.feedURI),
-        contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_XMLHTTPREQUEST
+        contentPolicyType: Ci.nsIContentPolicy.TYPE_DATAREQUEST
       }).QueryInterface(Ci.nsIHttpChannel);
       channel.loadGroup = loadgroup;
       channel.loadFlags |= Ci.nsIRequest.LOAD_BACKGROUND |
                            Ci.nsIRequest.LOAD_BYPASS_CACHE;
       channel.requestMethod = "GET";
       channel.setRequestHeader("X-Moz", "livebookmarks", false);
 
       // Stream the result to the feed parser with this listener
--- a/toolkit/components/search/tests/xpcshell/test_serialize_file.js
+++ b/toolkit/components/search/tests/xpcshell/test_serialize_file.js
@@ -36,17 +36,17 @@ add_task(function test_batchTask() {
 add_test(function test_addParam() {
   let engine = Services.search.getEngineByName("Test search engine");
   engine.addParam("param-name", "param-value", null);
 
   function readAsyncFile(aFile, aCallback) {
     NetUtil.asyncFetch({
       uri: NetUtil.newURI(aFile),
       loadUsingSystemPrincipal: true,
-      contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_XMLHTTPREQUEST
+      contentPolicyType: Ci.nsIContentPolicy.TYPE_DATAREQUEST
     }, function(inputStream, status) {
         do_check_true(Components.isSuccessCode(status));
 
         let data = NetUtil.readInputStreamToString(inputStream, inputStream.available());
         aCallback(data);
       });
   }
 
--- a/toolkit/components/thumbnails/PageThumbsProtocol.js
+++ b/toolkit/components/thumbnails/PageThumbsProtocol.js
@@ -80,17 +80,17 @@ Protocol.prototype = {
     let file = PageThumbsStorage.getFilePathForURL(url);
     let fileuri = Services.io.newFileURI(new FileUtils.File(file));
     let channel = Services.io.newChannelFromURIWithLoadInfo(fileuri, aLoadInfo);
     channel.originalURI = aURI;
     return channel;
   },
 
   newChannel: function Proto_newChannel(aURI) {
-    return this.newChannel2(aURI, null);
+    return newChannel2(aURI, null);
   },
 
   /**
    * Decides whether to allow a blacklisted port.
    * @return Always false, we'll never allow ports.
    */
   allowPort: function () false,
 
--- a/toolkit/mozapps/extensions/test/browser/browser_openDialog.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_openDialog.js
@@ -23,17 +23,17 @@ let CustomChromeProtocol = {
   newChannel2: function CCP_newChannel2(aURI, aLoadInfo) {
     let url = Services.io.newURI("chrome:" + aURI.path, null, null);
     let ch = Services.io.newChannelFromURIWithLoadInfo(url, aLoadInfo);
     ch.originalURI = aURI;
     return ch;
   },
 
   newChannel: function CCP_newChannel(aURI) {
-    return this.newChannel2(aURI, null);
+    return newChannel2(aURI, null);
   },
 
   allowPort: function CCP_allowPort(aPort, aScheme) {
     return false;
   },
 
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsIProtocolHandler
--- a/toolkit/mozapps/update/nsUpdateService.js
+++ b/toolkit/mozapps/update/nsUpdateService.js
@@ -1257,17 +1257,17 @@ function getLocale() {
   for (let res of ['app', 'gre']) {
     channel = Services.io.newChannel2("resource://" + res + "/" + FILE_UPDATE_LOCALE,
                                       null,
                                       null,
                                       null,      // aLoadingNode
                                       Services.scriptSecurityManager.getSystemPrincipal(),
                                       null,      // aTriggeringPrincipal
                                       Ci.nsILoadInfo.SEC_NORMAL,
-                                      Ci.nsIContentPolicy.TYPE_INTERNAL_XMLHTTPREQUEST);
+                                      Ci.nsIContentPolicy.TYPE_DATAREQUEST);
     try {
       var inputStream = channel.open();
       gLocale = readStringFromInputStream(inputStream);
     } catch(e) {}
     if (gLocale)
       break;
   }