Bug 1351190 - Revert the change we made in this bug, since it causes a crash in bug 1404681. r=me
authorcku <cku@mozilla.com>
Fri, 06 Oct 2017 16:31:35 +0800
changeset 384774 2d7b8b5dd174bd9db5894c6cb770e05f83e95ee3
parent 384773 db84e128b71dfe8d30bdb237a95acbb1c65697c7
child 384775 726d74704ad6c72a0a926fd52f30803448777be4
child 384963 dde44491690467f0b59a942e5565ba5d3eed69de
push id95865
push usercku@mozilla.com
push dateFri, 06 Oct 2017 17:10:49 +0000
treeherdermozilla-inbound@2d7b8b5dd174 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1351190, 1404681
milestone58.0a1
first release with
nightly linux32
2d7b8b5dd174 / 58.0a1 / 20171006220306 / files
nightly linux64
2d7b8b5dd174 / 58.0a1 / 20171006220306 / files
nightly mac
2d7b8b5dd174 / 58.0a1 / 20171006220306 / files
nightly win32
2d7b8b5dd174 / 58.0a1 / 20171006220306 / files
nightly win64
2d7b8b5dd174 / 58.0a1 / 20171006220306 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1351190 - Revert the change we made in this bug, since it causes a crash in bug 1404681. r=me MozReview-Commit-ID: 87CBqK6upIU
dom/ipc/ContentChild.cpp
toolkit/components/printingui/ipc/nsPrintingProxy.cpp
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -582,23 +582,16 @@ ContentChild::RecvSetXPCOMProcessAttribu
   }
 
   mLookAndFeelCache = Move(aLookAndFeelIntCache);
   mFontFamilies = Move(aFontFamilyList);
   gfx::gfxVars::SetValuesForInitialize(aXPCOMInit.gfxNonDefaultVarUpdates());
   InitXPCOM(aXPCOMInit, aInitialData);
   InitGraphicsDeviceData(aXPCOMInit.contentDeviceData());
 
-#ifdef NS_PRINTING
-  // Force the creation of the nsPrintingProxy so that it's IPC counterpart,
-  // PrintingParent, is always available for printing initiated from the parent.
-  // Create nsPrintingProxy instance later than the SystemGroup initialization.
-  RefPtr<nsPrintingProxy> printingProxy = nsPrintingProxy::GetInstance();
-#endif
-
   return IPC_OK();
 }
 
 bool
 ContentChild::Init(MessageLoop* aIOLoop,
                    base::ProcessId aParentPid,
                    IPC::Channel* aChannel,
                    uint64_t aChildID,
@@ -676,16 +669,22 @@ ContentChild::Init(MessageLoop* aIOLoop,
 
 #ifdef MOZ_CRASHREPORTER
   CrashReporterClient::InitSingleton(this);
 #endif
 
   mID = aChildID;
   mIsForBrowser = aIsForBrowser;
 
+#ifdef NS_PRINTING
+  // Force the creation of the nsPrintingProxy so that it's IPC counterpart,
+  // PrintingParent, is always available for printing initiated from the parent.
+  RefPtr<nsPrintingProxy> printingProxy = nsPrintingProxy::GetInstance();
+#endif
+
   SetProcessName(NS_LITERAL_STRING("Web Content"));
 
 #ifdef NIGHTLY_BUILD
   // NOTE: We have to register the annotator on the main thread, as annotators
   // only affect a single thread.
   SystemGroup::Dispatch(TaskCategory::Other,
                         NS_NewRunnableFunction("RegisterPendingInputEventHangAnnotator", [] {
                           HangMonitor::RegisterAnnotator(
--- a/toolkit/components/printingui/ipc/nsPrintingProxy.cpp
+++ b/toolkit/components/printingui/ipc/nsPrintingProxy.cpp
@@ -58,20 +58,16 @@ nsPrintingProxy::GetInstance()
 
   RefPtr<nsPrintingProxy> inst = sPrintingProxyInstance.get();
   return inst.forget();
 }
 
 nsresult
 nsPrintingProxy::Init()
 {
-  ContentChild::GetSingleton()->SetEventTargetForActor(this,
-    SystemGroup::EventTargetFor(mozilla::TaskCategory::Other));
-  MOZ_ASSERT(this->GetActorEventTarget());
-
   mozilla::Unused << ContentChild::GetSingleton()->SendPPrintingConstructor(this);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPrintingProxy::ShowPrintDialog(mozIDOMWindowProxy *parent,
                                  nsIWebBrowserPrint *webBrowserPrint,
                                  nsIPrintSettings *printSettings)