mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 830236 (follow-up) - Keep the print engine when printing finished inside Print Preview. Make nsPrintEngine::DestroyPrintingData re-entrancy safe. r=cam
This commit is contained in:
parent
fc6d45f790
commit
7a42e0132e
@ -4263,10 +4263,10 @@ nsDocumentViewer::OnDonePrinting()
|
||||
#if defined(NS_PRINTING) && defined(NS_PRINT_PREVIEW)
|
||||
if (mPrintEngine) {
|
||||
nsRefPtr<nsPrintEngine> pe = mPrintEngine;
|
||||
mPrintEngine = nullptr;
|
||||
if (GetIsPrintPreview()) {
|
||||
pe->DestroyPrintingData();
|
||||
} else {
|
||||
mPrintEngine = nullptr;
|
||||
pe->Destroy();
|
||||
}
|
||||
|
||||
|
@ -279,8 +279,9 @@ void nsPrintEngine::Destroy()
|
||||
void nsPrintEngine::DestroyPrintingData()
|
||||
{
|
||||
if (mPrt) {
|
||||
delete mPrt;
|
||||
nsPrintData* data = mPrt;
|
||||
mPrt = nullptr;
|
||||
delete data;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user