Backed out changeset 04cda7684b40 (bug 1217876) for failing xpcshell test test_resumable_channel_wrap.js in debug builds. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sun, 25 Sep 2016 11:00:29 +0200
changeset 315242 54ac14a91d83443349a06c55ba11423c2c5ddabf
parent 315241 aef020a0ba34408c4d416c554ea3797aa167c5db
child 315243 2cb11a4e6f61536a8d4800da0562ec7f193200e6
push id32563
push userihsiao@mozilla.com
push dateMon, 26 Sep 2016 11:18:33 +0000
treeherderautoland@eb840c87b5fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1217876
milestone52.0a1
backs out04cda7684b40ba85af735d4b37bf8d45bb88888f
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 04cda7684b40 (bug 1217876) for failing xpcshell test test_resumable_channel_wrap.js in debug builds. r=backout
netwerk/protocol/http/HttpChannelParent.cpp
netwerk/protocol/http/HttpChannelParentListener.cpp
toolkit/components/passwordmgr/test/mochitest/mochitest.ini
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -17,28 +17,25 @@
 #include "nsHttpHandler.h"
 #include "nsNetUtil.h"
 #include "nsISupportsPriority.h"
 #include "nsIAuthPromptProvider.h"
 #include "nsSerializationHelper.h"
 #include "nsISerializable.h"
 #include "nsIAssociatedContentSecurity.h"
 #include "nsIApplicationCacheService.h"
-#include "nsIAuthPrompt.h"
-#include "nsIAuthPrompt2.h"
 #include "mozilla/ipc/InputStreamUtils.h"
 #include "mozilla/ipc/URIUtils.h"
 #include "SerializedLoadContext.h"
 #include "nsIAuthInformation.h"
 #include "nsIAuthPromptCallback.h"
 #include "nsIContentPolicy.h"
 #include "mozilla/ipc/BackgroundUtils.h"
 #include "nsIOService.h"
 #include "nsICachingChannel.h"
-#include "nsIPromptFactory.h"
 #include "mozilla/LoadInfo.h"
 #include "nsQueryObject.h"
 #include "mozilla/BasePrincipal.h"
 #include "nsCORSListenerProxy.h"
 #include "nsIPrompt.h"
 #include "nsIWindowWatcher.h"
 #include "nsIDocument.h"
 #include "nsStringStream.h"
@@ -173,59 +170,44 @@ NS_INTERFACE_MAP_END
 
 //-----------------------------------------------------------------------------
 // HttpChannelParent::nsIInterfaceRequestor
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
 HttpChannelParent::GetInterface(const nsIID& aIID, void **result)
 {
-  nsresult rv;
-
   if (aIID.Equals(NS_GET_IID(nsIAuthPromptProvider)) ||
       aIID.Equals(NS_GET_IID(nsISecureBrowserUI))) {
     if (mTabParent) {
       return mTabParent->QueryInterface(aIID, result);
     }
   }
 
   // Only support nsIAuthPromptProvider in Content process
   if (XRE_IsParentProcess() &&
       aIID.Equals(NS_GET_IID(nsIAuthPromptProvider))) {
     *result = nullptr;
     return NS_OK;
   }
 
-  // A system XHR can be created without reference to a window, hence mTabParent
-  // may be null.  In that case we want to let the window watcher pick a prompt
-  // directly.
-  if (!mTabParent &&
-      (aIID.Equals(NS_GET_IID(nsIAuthPrompt)) ||
-       aIID.Equals(NS_GET_IID(nsIAuthPrompt2)))) {
-    nsCOMPtr<nsIPromptFactory> wwatch =
-      do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    return wwatch->GetPrompt(nullptr, aIID,
-                             reinterpret_cast<void**>(result));
-  }
-
   // Only support nsILoadContext if child channel's callbacks did too
   if (aIID.Equals(NS_GET_IID(nsILoadContext)) && mLoadContext) {
     nsCOMPtr<nsILoadContext> copy = mLoadContext;
     copy.forget(result);
     return NS_OK;
   }
 
   if (mTabParent && aIID.Equals(NS_GET_IID(nsIPrompt))) {
     nsCOMPtr<Element> frameElement = mTabParent->GetOwnerElement();
     if (frameElement) {
       nsCOMPtr<nsPIDOMWindowOuter> win =frameElement->OwnerDoc()->GetWindow();
       NS_ENSURE_TRUE(win, NS_ERROR_UNEXPECTED);
 
+      nsresult rv;
       nsCOMPtr<nsIWindowWatcher> wwatch =
         do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv);
 
       if (NS_WARN_IF(!NS_SUCCEEDED(rv))) {
         return rv;
       }
 
       nsCOMPtr<nsIPrompt> prompt;
--- a/netwerk/protocol/http/HttpChannelParentListener.cpp
+++ b/netwerk/protocol/http/HttpChannelParentListener.cpp
@@ -5,19 +5,22 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // HttpLog.h should generally be included first
 #include "HttpLog.h"
 
 #include "HttpChannelParentListener.h"
 #include "mozilla/net/HttpChannelParent.h"
 #include "mozilla/Unused.h"
+#include "nsIAuthPrompt.h"
+#include "nsIAuthPrompt2.h"
 #include "nsIHttpEventSink.h"
 #include "nsIHttpHeaderVisitor.h"
 #include "nsIRedirectChannelRegistrar.h"
+#include "nsIPromptFactory.h"
 #include "nsQueryObject.h"
 
 using mozilla::Unused;
 
 namespace mozilla {
 namespace net {
 
 HttpChannelParentListener::HttpChannelParentListener(HttpChannelParent* aInitialChannel)
@@ -127,16 +130,27 @@ HttpChannelParentListener::GetInterface(
   nsCOMPtr<nsIInterfaceRequestor> ir;
   if (mNextListener &&
       NS_SUCCEEDED(CallQueryInterface(mNextListener.get(),
                                       getter_AddRefs(ir))))
   {
     return ir->GetInterface(aIID, result);
   }
 
+  if (aIID.Equals(NS_GET_IID(nsIAuthPrompt)) ||
+      aIID.Equals(NS_GET_IID(nsIAuthPrompt2))) {
+    nsresult rv;
+    nsCOMPtr<nsIPromptFactory> wwatch =
+      do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv);
+    NS_ENSURE_SUCCESS(rv, rv);
+
+    return wwatch->GetPrompt(nullptr, aIID,
+                             reinterpret_cast<void**>(result));
+  }
+
   return NS_NOINTERFACE;
 }
 
 //-----------------------------------------------------------------------------
 // HttpChannelParentListener::nsIChannelEventSink
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
--- a/toolkit/components/passwordmgr/test/mochitest/mochitest.ini
+++ b/toolkit/components/passwordmgr/test/mochitest/mochitest.ini
@@ -45,15 +45,15 @@ skip-if = toolkit == 'android' # autocom
 [test_input_events_for_identical_values.html]
 [test_maxlength.html]
 [test_passwords_in_type_password.html]
 [test_prompt.html]
 skip-if = os == "linux" || toolkit == 'android' # Tests desktop prompts
 [test_prompt_http.html]
 skip-if = os == "linux" || toolkit == 'android' # Tests desktop prompts
 [test_prompt_noWindow.html]
-skip-if = toolkit == 'android' # Tests desktop prompts.
+skip-if = e10s || toolkit == 'android' # Tests desktop prompts. e10s: bug 1217876
 [test_prompt_promptAuth.html]
 skip-if = os == "linux" || toolkit == 'android' # Tests desktop prompts
 [test_prompt_promptAuth_proxy.html]
 skip-if = e10s || os == "linux" || toolkit == 'android' # Tests desktop prompts
 [test_recipe_login_fields.html]
 [test_xhr_2.html]