Bug 1278505 - Remove unneeded NS_NOTREACHED from DeallocPPrintProgressDialogChild(). r?mconley draft
authorTing-Yu Chou <janus926@gmail.com>
Fri, 22 Jul 2016 09:35:22 +0800
changeset 391022 7bc62618c86920551635a990f2137b16ac3d348a
parent 390029 d224fc999cb6accb208af0a105f14433375e2e77
child 526108 2bf54ebba47d4226d3bd2863911812c57320404b
push id23789
push userbmo:janus926@gmail.com
push dateFri, 22 Jul 2016 01:35:56 +0000
reviewersmconley
bugs1278505
milestone50.0a1
Bug 1278505 - Remove unneeded NS_NOTREACHED from DeallocPPrintProgressDialogChild(). r?mconley MozReview-Commit-ID: 7WvZM390h8W
embedding/components/printingui/ipc/nsPrintingProxy.cpp
--- a/embedding/components/printingui/ipc/nsPrintingProxy.cpp
+++ b/embedding/components/printingui/ipc/nsPrintingProxy.cpp
@@ -221,21 +221,19 @@ nsPrintingProxy::AllocPPrintProgressDial
   NS_NOTREACHED("Allocator for PPrintProgressDialogChild should not be "
                 "called on nsPrintingProxy.");
   return nullptr;
 }
 
 bool
 nsPrintingProxy::DeallocPPrintProgressDialogChild(PPrintProgressDialogChild* aActor)
 {
-  // The parent process will never initiate the PPrintProgressDialog
-  // protocol connection, so no need to provide an deallocator here.
-  NS_NOTREACHED("Deallocator for PPrintProgressDialogChild should not be "
-                "called on nsPrintingProxy.");
-  return false;
+  // The PrintProgressDialogChild implements refcounting, and
+  // will take itself out.
+  return true;
 }
 
 PPrintSettingsDialogChild*
 nsPrintingProxy::AllocPPrintSettingsDialogChild()
 {
   // The parent process will never initiate the PPrintSettingsDialog
   // protocol connection, so no need to provide an allocator here.
   NS_NOTREACHED("Allocator for PPrintSettingsDialogChild should not be "