Bug 1264231 - Part 3: remove loadInfo work-around. r=sicking
authorYoshi Huang <allstars.chh@mozilla.com>
Thu, 28 Jul 2016 11:45:09 +0800
changeset 351900 a6b262acd1b335d81e301713648c5c16f992ea40
parent 351899 b1a4bb4e923ccf349506d33ac28ce9303764c867
child 351901 46d487ebf9afe289928ca424071bb58a870c65cd
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssicking
bugs1264231
milestone51.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 1264231 - Part 3: remove loadInfo work-around. r=sicking
dom/html/HTMLMediaElement.cpp
image/imgLoader.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -567,24 +567,16 @@ public:
                                 nsIChannel::LOAD_CALL_CONTENT_SNIFFERS);
 
     if (NS_FAILED(rv)) {
       // Notify load error so the element will try next resource candidate.
       aElement->NotifyLoadError();
       return;
     }
 
-    // This is a workaround and it will be fix in bug 1264230.
-    nsCOMPtr<nsILoadInfo> loadInfo = channel->GetLoadInfo();
-    if (loadInfo) {
-      NeckoOriginAttributes originAttrs;
-      NS_GetOriginAttributes(channel, originAttrs);
-      loadInfo->SetOriginAttributes(originAttrs);
-    }
-
     // The listener holds a strong reference to us.  This creates a
     // reference cycle, once we've set mChannel, which is manually broken
     // in the listener's OnStartRequest method after it is finished with
     // the element. The cycle will also be broken if we get a shutdown
     // notification before OnStartRequest fires.  Necko guarantees that
     // OnStartRequest will eventually fire if we don't shut down first.
     RefPtr<MediaLoadListener> loadListener = new MediaLoadListener(aElement);
 
--- a/image/imgLoader.cpp
+++ b/image/imgLoader.cpp
@@ -846,31 +846,16 @@ NewImageChannel(nsIChannel** aResult,
 
   nsCOMPtr<nsILoadGroup> loadGroup = do_CreateInstance(NS_LOADGROUP_CONTRACTID);
   nsCOMPtr<nsILoadGroupChild> childLoadGroup = do_QueryInterface(loadGroup);
   if (childLoadGroup) {
     childLoadGroup->SetParentLoadGroup(aLoadGroup);
   }
   (*aResult)->SetLoadGroup(loadGroup);
 
-  // This is a workaround and a real fix in bug 1264231.
-  if (callbacks) {
-    nsCOMPtr<nsILoadContext> loadContext = do_GetInterface(callbacks);
-    if (loadContext) {
-      nsCOMPtr<nsILoadInfo> loadInfo;
-      rv = (*aResult)->GetLoadInfo(getter_AddRefs(loadInfo));
-      NS_ENSURE_SUCCESS(rv, rv);
-      DocShellOriginAttributes originAttrs;
-      loadContext->GetOriginAttributes(originAttrs);
-      NeckoOriginAttributes neckoOriginAttrs;
-      neckoOriginAttrs.InheritFromDocShellToNecko(originAttrs);
-      loadInfo->SetOriginAttributes(neckoOriginAttrs);
-    }
-  }
-
   return NS_OK;
 }
 
 static uint32_t
 SecondsFromPRTime(PRTime prTime)
 {
   return uint32_t(int64_t(prTime) / int64_t(PR_USEC_PER_SEC));
 }