[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser] 28/36: Bug 1789439 - Throw rather than logging an error when tab-modal print is already open. r=mstriemer a=pascalc
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to annotated tag FIREFOX_102_4_0esr_BUILD1
in repository tor-browser.
commit 6d5378a68f998239d3a0cc7fd43f88aa77f35caa
Author: Emilio Cobos Álvarez <emilio@xxxxxxxxx>
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 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/toolkit/components/printing/content/printUtils.js b/toolkit/components/printing/content/printUtils.js
index d348e207a29e..ddda5951a36d 100644
--- a/toolkit/components/printing/content/printUtils.js
+++ b/toolkit/components/printing/content/printUtils.js
@@ -194,8 +194,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...
- Cu.reportError("Tab-modal print UI already open");
- return 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.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits