Bug 1363472 - Ensure not sending wyciwyg constructor when shutting down, r=valentin
☠☠ backed out by 66b20d029e95 ☠ ☠
authorJunior Hsu <juhsu@mozilla.com>
Tue, 09 May 2017 23:57:00 +0200
changeset 405672 7cd208304d1fb4a58908d707d991eb5b10d53f7b
parent 405671 7cb6ed5e7e4b72b143e118578c103d2e1ff0df35
child 405673 2e22c0308a7ea5f19d4616d408a65cdf39292c4c
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1363472
milestone55.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 1363472 - Ensure not sending wyciwyg constructor when shutting down, r=valentin
netwerk/protocol/wyciwyg/nsWyciwygProtocolHandler.cpp
--- a/netwerk/protocol/wyciwyg/nsWyciwygProtocolHandler.cpp
+++ b/netwerk/protocol/wyciwyg/nsWyciwygProtocolHandler.cpp
@@ -87,16 +87,21 @@ nsWyciwygProtocolHandler::NewChannel2(ns
 
   NS_ENSURE_ARG_POINTER(url);
   nsresult rv;
 
   nsCOMPtr<nsIWyciwygChannel> channel;
   if (IsNeckoChild()) {
     NS_ENSURE_TRUE(gNeckoChild != nullptr, NS_ERROR_FAILURE);
 
+    ContentChild* cc = static_cast<ContentChild*>(gNeckoChild->Manager());
+    if (cc->IsShuttingDown()) {
+      return NS_ERROR_FAILURE;
+    }
+
     WyciwygChannelChild *wcc = static_cast<WyciwygChannelChild *>(
                                  gNeckoChild->SendPWyciwygChannelConstructor());
     if (!wcc)
       return NS_ERROR_OUT_OF_MEMORY;
 
     channel = wcc;
     rv = wcc->Init(url);
     if (NS_FAILED(rv))