Closed
Bug 1043958
Opened 11 years ago
Closed 7 years ago
Incorrect return on unsafeWindow
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: yohann.jardin, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0 (Beta/Release)
Build ID: 20140724030201
Steps to reproduce:
1. Download https://addons.mozilla.org/fr/firefox/addon/greasemonkey/
2. Go to https://bugzilla.mozilla.org/
3. Tools -> Greasemonkey -> New User Script -> Name= bugzilla, Namespace= bugzilla, Description = (empty), Includes= https://bugzilla.mozilla.org/, Excludes = (empty) -> Press Ok
4. Write the following line in the script :
// ==UserScript==
// @name bugzilla
// @namespace bugzilla
// @include https://bugzilla.mozilla.org/
// @version 1
// @grant GM_getValue
// @grant GM_setValue
// ==/UserScript==
alert(unsafeWindow.BUGZILLA);
5. Reload https://bugzilla.mozilla.org/
Actual results:
The result of the alert is "undefined"
Expected results:
The result of the alert should be "[object Object]"
Replacing
// @grant GM_getValue
// @grant GM_setValue
with
// @grant none
The script now is :
// ==UserScript==
// @name bugzilla
// @namespace bugzilla
// @include https://bugzilla.mozilla.org/
// @version 1
// @grant none
// ==/UserScript==
alert(unsafeWindow.BUGZILLA);
The result of the alert is "[object Object]", as expected.
Works fine on 2014-07-23, bad on 2014-07-24.
Seems that last good revision is 63f44b4968c2 and first bad revision is fdfb57a0fe0b .
Comment 1•11 years ago
|
||
Comment 2•11 years ago
|
||
Bug 742444 landed in that range and explicitly mentions unsafeWindow in its description.
Flags: needinfo?(bobbyholley)
Comment 3•11 years ago
|
||
Anthony, my guess is that Greasemonkey will need the same kind of jiggering as we did for Jetpack: https://hg.mozilla.org/mozilla-central/rev/77ba979e76af
Does that sound right?
Flags: needinfo?(bobbyholley) → needinfo?(arantius)
Comment 4•11 years ago
|
||
Confirmed; https://github.com/greasemonkey/greasemonkey/commit/4dd733ccb1abb7c1232950299c8f65ca72bf8875 fixes Greasemonkey.
Flags: needinfo?(arantius)
Updated•7 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Summary: unsafeWindow → Incorrect return on unsafeWindow
You need to log in
before you can comment on or make changes to this bug.
Description
•