Bug 1404176 - Remove aborted print preview browser before bailing out. r=mconley a=gchang
authorMatheus Longaray <mlongaray@hp.com>
Mon, 13 Nov 2017 17:17:57 +0100
changeset 444951 14022278b66d392fdf203cf4bc08fee82b47d286
parent 444950 725b718e10c8374b5be64c41635581cf41866e6e
child 444952 a66f23b1940632778b6447d967469bb97c2e72ab
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley, gchang
bugs1404176
milestone58.0
Bug 1404176 - Remove aborted print preview browser before bailing out. r=mconley a=gchang This patch clears out set of print preview browsers before bailing out when there is an error while putting the document into print preview mode. MozReview-Commit-ID: 20cm4DCktQk
toolkit/components/printing/content/printUtils.js
--- a/toolkit/components/printing/content/printUtils.js
+++ b/toolkit/components/printing/content/printUtils.js
@@ -597,16 +597,17 @@ var PrintUtils = {
     }
 
     let onEntered = (message) => {
       mm.removeMessageListener("Printing:Preview:Entered", onEntered);
 
       if (message.data.failed) {
         // Something went wrong while putting the document into print preview
         // mode. Bail out.
+        this._ppBrowsers.clear();
         this._listener.onEnter();
         this._listener.onExit();
         return;
       }
 
       // Stash the focused element so that we can return to it after exiting
       // print preview.
       gFocusedElement = document.commandDispatcher.focusedElement;