Skip to content

Commit 45de4f5

Browse files
committed
Backed out 5 changesets (bug 1817443) for newtab failure CLOSED TREE
Backed out changeset ba33c510d008 (bug 1817443) Backed out changeset 07e3bccaeb6d (bug 1817443) Backed out changeset 2b39dee42948 (bug 1817443) Backed out changeset a74a52e93af4 (bug 1817443) Backed out changeset 827855beb033 (bug 1817443)
1 parent 3b390e1 commit 45de4f5

File tree

14 files changed

+635
-779
lines changed

14 files changed

+635
-779
lines changed

browser/base/content/browser-menubar.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@
504504
hidden="true"/>
505505
<menuitem id="helpPolicySupport"
506506
hidden="true"
507-
oncommand="openTrustedLinkIn(Services.policies.getSupportMenu().URL.href, 'tab');"/>
507+
oncommand="openUILinkIn(Services.policies.getSupportMenu().URL.href, 'tab', {triggeringPrincipal: Services.scriptSecurityManager.createNullPrincipal({})});"/>
508508
</menupopup>
509509
</menu>
510510
</menubar>

browser/base/content/browser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2808,7 +2808,7 @@ function openLocation(event) {
28082808
}
28092809

28102810
// If there's an open browser window, redirect the command there.
2811-
let win = URILoadingHelper.getTargetWindow(window);
2811+
let win = getTopWin();
28122812
if (win) {
28132813
win.focus();
28142814
win.openLocation();
@@ -3947,7 +3947,7 @@ const BrowserSearch = {
39473947
window.location.href != AppConstants.BROWSER_CHROME_URL ||
39483948
gURLBar.readOnly
39493949
) {
3950-
let win = URILoadingHelper.getTopWin(window, { skipPopups: true });
3950+
let win = getTopWin({ skipPopups: true });
39513951
if (win) {
39523952
// If there's an open browser window, it should handle this command
39533953
win.focus();

browser/base/content/test/about/browser_aboutNewTab_bookmarksToolbarNewWindow.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ async function test_bookmarks_toolbar_visibility({ newTabEnabled }) {
3333
let newWindowOpened = BrowserTestUtils.domWindowOpened();
3434
let beforeShown = TestUtils.topicObserved("browser-window-before-show");
3535

36-
openTrustedLinkIn(url, "window");
36+
let triggeringPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
37+
openUILinkIn(url, "window", { triggeringPrincipal });
3738

3839
let newWin = await newWindowOpened;
3940
let slowSiteLoaded = BrowserTestUtils.firstBrowserLoaded(newWin, false);

browser/base/content/test/contextMenu/browser_utilityOverlay.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ add_task(async function test_eventMatchesKey() {
5151
}
5252
});
5353

54-
add_task(async function test_getTargetWindow() {
55-
is(URILoadingHelper.getTargetWindow(window), window, "got top window");
54+
add_task(async function test_getTopWin() {
55+
is(getTopWin(), window, "got top window");
5656
});
5757

5858
add_task(async function test_openUILink() {
59-
const kURL = "https://example.org/";
59+
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
60+
const kURL = "http://example.org/";
6061
let tab = await BrowserTestUtils.openNewForegroundTab(
6162
gBrowser,
6263
"about:blank"

0 commit comments

Comments
 (0)