diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-25 15:48:44 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-25 15:48:44 +0200 |
commit | 3ab6c7feee8126bdfc5c9ab9371db41102e12e95 (patch) | |
tree | a309c45826300b888238b6a517051fe7e71d63eb /dom/ipc/ContentParent.cpp | |
parent | b18a9cf86ea25bc52d9cfea584e3aa8bfbe81f0a (diff) | |
parent | b069dabc91b7e0f5f8d161cdbe598276a21d6d68 (diff) | |
download | UXP-3ab6c7feee8126bdfc5c9ab9371db41102e12e95.tar UXP-3ab6c7feee8126bdfc5c9ab9371db41102e12e95.tar.gz UXP-3ab6c7feee8126bdfc5c9ab9371db41102e12e95.tar.lz UXP-3ab6c7feee8126bdfc5c9ab9371db41102e12e95.tar.xz UXP-3ab6c7feee8126bdfc5c9ab9371db41102e12e95.zip |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into pm_url_1
Diffstat (limited to 'dom/ipc/ContentParent.cpp')
-rw-r--r-- | dom/ipc/ContentParent.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 73621df22..286f1d851 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -3224,11 +3224,15 @@ PPrintingParent* ContentParent::AllocPPrintingParent() { #ifdef NS_PRINTING - MOZ_ASSERT(!mPrintingParent, - "Only one PrintingParent should be created per process."); + MOZ_RELEASE_ASSERT(!mPrintingParent, + "Only one PrintingParent should be created per process."); // Create the printing singleton for this process. mPrintingParent = new PrintingParent(); + + // Take another reference for IPDL code. + mPrintingParent.get()->AddRef(); + return mPrintingParent.get(); #else MOZ_ASSERT_UNREACHABLE("Should never be created if no printing."); @@ -3240,8 +3244,11 @@ bool ContentParent::DeallocPPrintingParent(PPrintingParent* printing) { #ifdef NS_PRINTING - MOZ_ASSERT(mPrintingParent == printing, - "Only one PrintingParent should have been created per process."); + MOZ_RELEASE_ASSERT(mPrintingParent == printing, + "Only one PrintingParent should have been created per process."); + + // Release reference taken for IPDL code. + static_cast<PrintingParent*>(printing)->Release(); mPrintingParent = nullptr; #else |