window closed blocked warning message has no identifiable origin

RESOLVED DUPLICATE of bug 606498

Status

DevTools
General
RESOLVED DUPLICATE of bug 606498
8 years ago
a month ago

People

(Reporter: msucan, Unassigned)

Tracking

Trunk

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
In nsGlobalWindow::Close() [1] an nsIScriptError message is logged, without any origin URI. This prevents the Web Console from showing the "window.close() blocked" warning, since it cannot associate the message from the console service with any open tab.

The comment in the source code suggests that it's not clear which URI should be used. I would suggest that (1) the URI of the script which invoked window.close() should be used. An alternative would be (2) to use the source document location URI that holds the script in question.

If option (1) is used .... we will still lack the ability to show the message *cough*, because we cannot easily track in which tab a specific script caused the warning message. There might be multiple pages with the same script, in different tabs. However, that would be a different bug - see bug 603706.

[1] http://mxr.mozilla.org/mozilla-central/source/dom/base/nsGlobalWindow.cpp#5840
(Reporter)

Comment 1

8 years ago
This is fixed by the patches from bug 606498.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 606498

Updated

a month ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.