Bug 1337056 - Part 8: Add nsIRequest::LOAD_HTML_OBJECT_DATA flag to identify requests loaded by nsObjectLoadingContent, r=mcmanus
authorMichael Layzell <michael@thelayzells.com>
Fri, 03 Mar 2017 18:20:37 -0500
changeset 348700 8c41abe5360d91ebc09bea90a476ee884935b8cc
parent 348699 cc03c82cb5651ee52586ba753f2af285fe0bd4b3
child 348701 8ea56abef5ea1a9c3ea0b7d4ee96e87f60d58335
push id31533
push userkwierso@gmail.com
push dateTue, 21 Mar 2017 23:08:53 +0000
treeherdermozilla-central@8744e9f8eb99 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs1337056
milestone55.0a1
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
Bug 1337056 - Part 8: Add nsIRequest::LOAD_HTML_OBJECT_DATA flag to identify requests loaded by nsObjectLoadingContent, r=mcmanus MozReview-Commit-ID: 3hgLRCeuiyD
dom/base/nsObjectLoadingContent.cpp
netwerk/base/nsIRequest.idl
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -2533,17 +2533,18 @@ nsObjectLoadingContent::OpenChannel()
                      mURI,
                      thisContent,
                      securityFlags,
                      contentPolicyType,
                      group, // aLoadGroup
                      shim,  // aCallbacks
                      nsIChannel::LOAD_CALL_CONTENT_SNIFFERS |
                      nsIChannel::LOAD_CLASSIFY_URI |
-                     nsIChannel::LOAD_BYPASS_SERVICE_WORKER);
+                     nsIChannel::LOAD_BYPASS_SERVICE_WORKER |
+                     nsIRequest::LOAD_HTML_OBJECT_DATA);
   NS_ENSURE_SUCCESS(rv, rv);
   if (inherit) {
     nsCOMPtr<nsILoadInfo> loadinfo = chan->GetLoadInfo();
     NS_ENSURE_STATE(loadinfo);
     loadinfo->SetPrincipalToInherit(thisContent->NodePrincipal());
   }
 
   // Referrer
--- a/netwerk/base/nsIRequest.idl
+++ b/netwerk/base/nsIRequest.idl
@@ -119,16 +119,23 @@ interface nsIRequest : nsISupports
 
     /**
      * Do not deliver status notifications to the nsIProgressEventSink and
      * do not block the loadgroup from completing (should this load belong to one).
      * Note: Progress notifications will still be delivered.
      */
     const unsigned long LOAD_BACKGROUND = 1 << 0;
 
+    /**
+     * This flag marks the request as being made to load the data for an html
+     * <object> tag. This means that the LOAD_DOCUMENT_URI flag may be set after
+     * the channel has been provided with the MIME type.
+     */
+    const unsigned long LOAD_HTML_OBJECT_DATA = 1 << 1;
+
     /**************************************************************************
      * The following flags control the flow of data into the cache.
      */
 
     /**
      * This flag prevents caching of any kind.  It does not, however, prevent
      * cached content from being used to satisfy this request.
      */