[tbb-commits] [tor-browser] 04/08: Bug 1789439 - Throw rather than logging an error when tab-modal print is already open. r=mstriemer a=pascalc

gitolite role git at cupani.torproject.org
Thu Oct 20 14:41:30 UTC 2022


This is an automated email from the git hooks/post-receive script.

richard pushed a commit to branch tor-browser-91.13.0esr-11.5-1
in repository tor-browser.

commit bb7b3aa304180e97b76ecc775f6c6b209db91711
Author: Emilio Cobos Álvarez <emilio at crisal.io>
AuthorDate: Thu Sep 15 15:37:57 2022 +0000

    Bug 1789439 - Throw rather than logging an error when tab-modal print is already open. r=mstriemer a=pascalc
    
    If we succeed but return null, we end up retargeting to a new window
    here:
    
      https://searchfox.org/mozilla-central/rev/3aaca0a12a2d1463da54933bdbdae2f06fead06f/dom/ipc/ContentParent.cpp#5462-5465
    
    Which is bad.
    
    Depends on D156682
    
    Differential Revision: https://phabricator.services.mozilla.com/D156683
---
 toolkit/components/printing/content/printUtils.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toolkit/components/printing/content/printUtils.js b/toolkit/components/printing/content/printUtils.js
index 6355affb1fcc..99ab4aef2148 100644
--- a/toolkit/components/printing/content/printUtils.js
+++ b/toolkit/components/printing/content/printUtils.js
@@ -197,7 +197,7 @@ var PrintUtils = {
       // XXX This can be racy can't it? getPreviewBrowser looks at browser that
       // we set up after opening the dialog. But I guess worst case we just
       // open two dialogs so...
-      return { promise: Promise.reject(), browser: null };
+      throw new Error("Tab-modal print UI already open");
     }
 
     // Create the print preview dialog.

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tbb-commits mailing list