Backed out changeset b2c472fe14ca (bug 1175480) for crashes in serviceworkers/test_request_context.htm
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 18 Jun 2015 09:54:44 +0200
changeset 249522 f1f1a9a1c46a2a6b3523960c5c55cd7f503d6f43
parent 249521 53c66ab06d3857038dc5fac8325a511657e608b2
child 249523 efe86609e77669a4780509a38b9d0ed04525c179
child 249589 2677f3e145063feb5d0271cd3f3e0469dd482a66
push id28927
push usercbook@mozilla.com
push dateThu, 18 Jun 2015 13:13:33 +0000
treeherdermozilla-central@efe86609e776 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1175480
milestone41.0a1
backs outb2c472fe14ca2f9e778a27743dd4a4c9f7207320
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 changeset b2c472fe14ca (bug 1175480) for crashes in serviceworkers/test_request_context.htm
dom/workers/ServiceWorkerManager.cpp
netwerk/base/LoadInfo.cpp
netwerk/base/nsILoadInfo.idl
--- a/dom/workers/ServiceWorkerManager.cpp
+++ b/dom/workers/ServiceWorkerManager.cpp
@@ -3195,17 +3195,17 @@ public:
     uint32_t loadFlags;
     rv = channel->GetLoadFlags(&loadFlags);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsILoadInfo> loadInfo;
     rv = channel->GetLoadInfo(getter_AddRefs(loadInfo));
     NS_ENSURE_SUCCESS(rv, rv);
 
-    mContentPolicyType = loadInfo->InternalContentPolicyType();
+    mContentPolicyType = loadInfo->GetContentPolicyType();
 
     nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(channel);
     if (httpChannel) {
       rv = httpChannel->GetRequestMethod(mMethod);
       NS_ENSURE_SUCCESS(rv, rv);
 
       nsCOMPtr<nsIHttpChannelInternal> internalChannel = do_QueryInterface(httpChannel);
       NS_ENSURE_TRUE(internalChannel, NS_ERROR_NOT_AVAILABLE);
--- a/netwerk/base/LoadInfo.cpp
+++ b/netwerk/base/LoadInfo.cpp
@@ -9,17 +9,16 @@
 #include "mozilla/Assertions.h"
 #include "nsFrameLoader.h"
 #include "nsIDocShell.h"
 #include "nsIDocument.h"
 #include "nsIDOMDocument.h"
 #include "nsIFrameLoader.h"
 #include "nsISupportsImpl.h"
 #include "nsISupportsUtils.h"
-#include "nsContentUtils.h"
 
 namespace mozilla {
 
 LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
                    nsIPrincipal* aTriggeringPrincipal,
                    nsINode* aLoadingContext,
                    nsSecurityFlags aSecurityFlags,
                    nsContentPolicyType aContentPolicyType,
@@ -168,26 +167,20 @@ LoadInfo::GetLoadingSandboxed(bool* aLoa
 {
   *aLoadingSandboxed = (mSecurityFlags & nsILoadInfo::SEC_SANDBOXED);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 LoadInfo::GetContentPolicyType(nsContentPolicyType* aResult)
 {
-  *aResult = nsContentUtils::InternalContentPolicyTypeToExternal(mContentPolicyType);
+  *aResult = mContentPolicyType;
   return NS_OK;
 }
 
-nsContentPolicyType
-LoadInfo::InternalContentPolicyType()
-{
-  return mContentPolicyType;
-}
-
 NS_IMETHODIMP
 LoadInfo::GetBaseURI(nsIURI** aBaseURI)
 {
   *aBaseURI = mBaseURI;
   NS_IF_ADDREF(*aBaseURI);
   return NS_OK;
 }
 
--- a/netwerk/base/nsILoadInfo.idl
+++ b/netwerk/base/nsILoadInfo.idl
@@ -12,17 +12,17 @@ interface nsINode;
 interface nsIPrincipal;
 interface nsIURI;
 
 typedef unsigned long nsSecurityFlags;
 
 /**
  * An nsILoadOwner represents per-load information about who started the load.
  */
-[scriptable, builtinclass, uuid(f6bce897-1a4a-4664-b96b-abacd6543e95)]
+[scriptable, builtinclass, uuid(dcf54f49-2d63-4c34-9da1-54df235f354c)]
 interface nsILoadInfo : nsISupports
 {
   /**
    * No special security flags:
    */
   const unsigned long SEC_NORMAL = 0;
 
   /**
@@ -148,48 +148,32 @@ interface nsILoadInfo : nsISupports
   /**
    * If loadingSandboxed is true, the data coming from the channel is
    * being loaded sandboxed, so it should have a nonce origin and
    * hence should use a NullPrincipal.
    */
   [infallible] readonly attribute boolean loadingSandboxed;
 
   /**
-   * The external contentPolicyType of the channel, used for security checks
+   * The contentPolicyType of the channel, used for security checks
    * like Mixed Content Blocking and Content Security Policy.
-   *
-   * Specifically, content policy types with _INTERNAL_ in their name will
-   * never get returned from this attribute.
    */
   readonly attribute nsContentPolicyType contentPolicyType;
 
 %{ C++
   inline nsContentPolicyType GetContentPolicyType()
   {
     nsContentPolicyType result;
     mozilla::DebugOnly<nsresult> rv = GetContentPolicyType(&result);
     MOZ_ASSERT(NS_SUCCEEDED(rv));
     return result;
   }
 %}
 
   /**
-   * The internal contentPolicyType of the channel, used for constructing
-   * RequestContext values when creating a fetch event for an intercepted
-   * channel.
-   *
-   * This should not be used for the purposes of security checks, since
-   * the content policy implementations cannot be expected to deal with
-   * _INTERNAL_ values.  Please use the contentPolicyType attribute above
-   * for that purpose.
-   */
-  [noscript, notxpcom]
-  nsContentPolicyType internalContentPolicyType();
-
-  /**
    * A base URI for use in situations where it cannot otherwise be inferred.
    * This attribute may be null.  The value of this attribute may be
    * ignored if the base URI can be inferred by the channel's URI.
    */
   readonly attribute nsIURI baseURI;
 
   /**
    * A C++-friendly version of baseURI.