$OpenBSD$ index f4ce2a7..c76c6f7 100644 --- content/base/src/nsContentUtils.cpp.orig Fri Feb 20 15:40:36 2015 +++ content/base/src/nsContentUtils.cpp Fri Feb 20 15:40:36 2015 @@ -176,6 +176,7 @@ #include "xpcprivate.h" // nsXPConnect #include "HTMLSplitOnSpacesTokenizer.h" #include "nsContentTypeParser.h" +#include "mozIThirdPartyUtil.h" #include "nsIBidiKeyboard.h" @@ -2744,20 +2745,24 @@ nsContentUtils::LoadImage(nsIURI* aURI, nsIDocument* aLoadingDocument, // Make the URI immutable so people won't change it under us NS_TryToSetImmutable(aURI); - - // XXXbz using "documentURI" for the initialDocumentURI is not quite - // right, but the best we can do here... - return imgLoader->LoadImage(aURI, /* uri to load */ - documentURI, /* initialDocumentURI */ - aReferrer, /* referrer */ - aLoadingPrincipal, /* loading principal */ - loadGroup, /* loadgroup */ - aObserver, /* imgINotificationObserver */ - aLoadingDocument, /* uniquification key */ - aLoadFlags, /* load flags */ - nullptr, /* cache key */ - channelPolicy, /* CSP info */ - initiatorType, /* the load initiator */ + + nsCOMPtr firstPartyIsolationURI; + nsCOMPtr thirdPartySvc + = do_GetService(THIRDPARTYUTIL_CONTRACTID); + thirdPartySvc->GetFirstPartyIsolationURI(nullptr, aLoadingDocument, + getter_AddRefs(firstPartyIsolationURI)); + + return imgLoader->LoadImage(aURI, /* uri to load */ + firstPartyIsolationURI, /* firstPartyIsolationURI */ + aReferrer, /* referrer */ + aLoadingPrincipal, /* loading principal */ + loadGroup, /* loadgroup */ + aObserver, /* imgINotificationObserver */ + aLoadingDocument, /* uniquification key */ + aLoadFlags, /* load flags */ + nullptr, /* cache key */ + channelPolicy, /* CSP info */ + initiatorType, /* the load initiator */ aRequest); }