Backed out changeset 24a113011b90 (bug 1162772)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sat, 30 Apr 2016 09:54:08 +0200
changeset 295610 5e4f1107cd17a9809d18234f4a7c2da5420ea9ab
parent 295609 2e73a4d863d497211a681d4ec09a1e3390ea2dae
child 295611 18c3745427c04961696b9178e1367abead511cd4
push id19015
push usercbook@mozilla.com
push dateMon, 02 May 2016 09:39:23 +0000
treeherderfx-team@2080375bc69d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1162772
milestone49.0a1
backs out24a113011b906a5f5a6a77245e4df817119e94f8
Backed out changeset 24a113011b90 (bug 1162772)
netwerk/base/LoadInfo.cpp
netwerk/base/nsILoadInfo.idl
--- a/netwerk/base/LoadInfo.cpp
+++ b/netwerk/base/LoadInfo.cpp
@@ -83,17 +83,16 @@ LoadInfo::LoadInfo(nsIPrincipal* aLoadin
   // if consumers pass both, aLoadingContext and aLoadingPrincipal
   // then the loadingPrincipal must be the same as the node's principal
   MOZ_ASSERT(!aLoadingContext || !aLoadingPrincipal ||
              aLoadingContext->NodePrincipal() == aLoadingPrincipal);
 
   // if the load is sandboxed, we can not also inherit the principal
   if (mSecurityFlags & nsILoadInfo::SEC_SANDBOXED) {
     mSecurityFlags ^= nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL;
-    mSecurityFlags |= nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL_WAS_DROPPED;
   }
 
   if (aLoadingContext) {
     nsCOMPtr<nsPIDOMWindowOuter> contextOuter = aLoadingContext->OwnerDoc()->GetWindow();
     if (contextOuter) {
       ComputeIsThirdPartyContext(contextOuter);
     }
 
@@ -190,17 +189,16 @@ LoadInfo::LoadInfo(nsPIDOMWindowOuter* a
   // Top-level loads are never third-party
   // Grab the information we can out of the window.
   MOZ_ASSERT(aOuterWindow);
   MOZ_ASSERT(mTriggeringPrincipal);
 
   // if the load is sandboxed, we can not also inherit the principal
   if (mSecurityFlags & nsILoadInfo::SEC_SANDBOXED) {
     mSecurityFlags ^= nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL;
-    mSecurityFlags |= nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL_WAS_DROPPED;
   }
 
   // NB: Ignore the current inner window since we're navigating away from it.
   mOuterWindowID = aOuterWindow->WindowID();
 
   // TODO We can have a parent without a frame element in some cases dealing
   // with the hidden window.
   nsCOMPtr<nsPIDOMWindowOuter> parent = aOuterWindow->GetScriptableParent();
--- a/netwerk/base/nsILoadInfo.idl
+++ b/netwerk/base/nsILoadInfo.idl
@@ -113,20 +113,17 @@ interface nsILoadInfo : nsISupports
    *
    * This will happen independently of the scheme of the URI that the
    * channel is loading.
    *
    * So if the loading document comes from "http://a.com/", and the channel
    * is loading the URI "http://b.com/whatever", GetChannelResultPrincipal
    * will return a principal from "http://a.com/".
    *
-   * This flag can not be used together with SEC_SANDBOXED.  If both are passed
-   * to the LoadInfo constructor then this flag will be dropped.  If you need
-   * to know whether this flag would have been present but was dropped due to
-   * sandboxing, check for the SEC_FORCE_INHERIT_PRINCIPAL_WAS_DROPPED flag.
+   * This flag can not be used together with SEC_SANDBOXED.
    */
   const unsigned long SEC_FORCE_INHERIT_PRINCIPAL = (1<<7);
 
   /**
    * Sandbox the load. The resulting resource will use a freshly created
    * null principal. So GetChannelResultPrincipal will always return a
    * null principal whenever this flag is set.
    *
@@ -165,24 +162,16 @@ interface nsILoadInfo : nsISupports
    * enforce even when a loading is not happening in the context of a document.
    *
    * If the flag is true, even if a document context is present,
    * GetUsePrivateBrowsing will always return true.
    */
   const unsigned long SEC_FORCE_PRIVATE_BROWSING = (1<<12);
 
   /**
-   * The SEC_FORCE_INHERIT_PRINCIPAL flag may be dropped when a load info
-   * object is created.  Specifically, it will be dropped if the SEC_SANDBOXED
-   * flag is also present.  This flag is set if SEC_FORCE_INHERIT_PRINCIPAL was
-   * dropped.
-   */
-  const unsigned long SEC_FORCE_INHERIT_PRINCIPAL_WAS_DROPPED = (1<<13);
-
-  /**
    * The loadingPrincipal is the principal that is responsible for the load.
    * It is *NOT* the principal tied to the resource/URI that this
    * channel is loading, it's the principal of the resource's
    * caller or requester. For example, if this channel is loading
    * an image from http://b.com that is embedded in a document
    * who's origin is http://a.com, the loadingPrincipal is http://a.com.
    *
    * The loadingPrincipal will never be null.