Closed
Bug 620486
Opened 14 years ago
Closed 14 years ago
window.wrappedJSObject != window.wrappedJSObject
Categories
(Core :: XPConnect, defect, P2)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: gal, Assigned: gal)
References
Details
(Whiteboard: [firebug-p1][hardblocker] fixed-in-tracemonkey)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #610390 +++
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b8pre) Gecko/20101107 Firefox/4.0b8pre
Build Identifier: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b8pre) Gecko/20101107 Firefox/4.0b8pre
The wrappedJSObjects returned by DOM nodes seem to return wrapped objects in such a way that each access returns a new wrapper which does not compare equal with any other wrappers for the same object. This problem extends to the wrappers returned by property accesses of the returned wrappers, such that the following always returns false:
let (w = content.wrappedJSObject) w == w.parent || w.parent == w.parent;
despite the fact that content == content.parent && content.parent == content.parent;
This bug is in particular responsible for a conflict between Greasemonkey/Scriptish and Firebug:
http://code.google.com/p/fbug/issues/detail?id=3586
http://github.com/greasemonkey/greasemonkey/issues/issue/1211
https://github.com/erikvold/scriptish/issues/issue/116
Reproducible: Always
Assignee | ||
Updated•14 years ago
|
Assignee | ||
Updated•14 years ago
|
Summary: Object wrappers no longer compare equal (among other things, window.wrappedJSObject != window.wrappedJSObject) → window.wrappedJSObject != window.wrappedJSObject
Assignee | ||
Comment 1•14 years ago
|
||
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → gal
Assignee | ||
Updated•14 years ago
|
blocking2.0: beta8+ → beta9+
Comment 3•14 years ago
|
||
bug 610390 comment 30 also has a pretty simple testcase.
Assignee | ||
Comment 4•14 years ago
|
||
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<window title="Mozilla Bug 610390"
onload="var doc = document.getElementById('ifr').contentDocument;
alert(doc.wrappedJSObject == doc.wrappedJSObject)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<iframe type="content" src="about:blank" id="ifr"/>
</window>
As per today's meeting, beta 9 will be a time-based release. Marking these all betaN+. Please move it back to beta9+ if you believe it MUST be in the next beta (ie: trunk is in an unshippable state without this)
Comment 6•14 years ago
|
||
Was there a reason to remove everyone from the CC field for this bug?
Comment 7•14 years ago
|
||
Arguments for this blocking were given in bug 610390. Those supporting this issue blocking the release (stated in bug 610390) include:
* jst (comment 5)
* Callek (comment 37)
* bz (comment 38)
* Kris Maglione (comment 40)
Updated•14 years ago
|
Fixing fields my automated script accidentally blanked. Apologies for the bugspam
Updated•14 years ago
|
Whiteboard: [firebug-p1]
Updated•14 years ago
|
Whiteboard: [firebug-p1] → [firebug-p1][hardblocker]
Comment 9•14 years ago
|
||
Dumb question: how do I run that xul test case?
Do I need to make a whole extension to stick it in? I tried pointing to it with a file:// URI, but even after setting dom.allow_XUL_XBL_for_file=true I'm not allowed to access .contentDocument.
Comment 10•14 years ago
|
||
(In reply to comment #9)
> Dumb question: how do I run that xul test case?
>
> Do I need to make a whole extension to stick it in? I tried pointing to it with
> a file:// URI, but even after setting dom.allow_XUL_XBL_for_file=true I'm not
> allowed to access .contentDocument.
I have been wondering the same thing with XUL file attachments.
Comment 11•14 years ago
|
||
This is responsible for some Firebug issues with FF4, not to mention extensions that deal with content and do any comparisons (um... like mine).
Assignee | ||
Comment 12•14 years ago
|
||
I think I found the cause. Patch soon.
Assignee | ||
Comment 13•14 years ago
|
||
Contrary to my original assumption this doesn't fix the instanceof issue.
Assignee | ||
Updated•14 years ago
|
Attachment #503556 -
Flags: review?(mrbkap)
Assignee | ||
Comment 14•14 years ago
|
||
Attachment #503556 -
Attachment is obsolete: true
Attachment #503556 -
Flags: review?(mrbkap)
Assignee | ||
Updated•14 years ago
|
Attachment #503573 -
Flags: review?(mrbkap)
Updated•14 years ago
|
Attachment #503573 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 15•14 years ago
|
||
Updated•14 years ago
|
Whiteboard: [firebug-p1][hardblocker] → [firebug-p1][hardblocker] fixed-in-tracemonkey
Comment 17•14 years ago
|
||
How long before this shows up in Minefield?
Assignee | ||
Comment 18•14 years ago
|
||
Chris, you merged this but it seems you missed marking it.
This is in mozilla-central and should be in tonights nightly.
http://hg.mozilla.org/mozilla-central/rev/a6bd34672545
Assignee | ||
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 19•14 years ago
|
||
I think I may have hit another version of this bug.In the same code where we had this bug before:
if (context.window == rootWindow)
return context;
I find that the test is false if the rootWindow comes from the outer most scope of a stack frame in jsd and it is a chrome URL in a content window. The script filename URLs are http.
Does this ring a bell with anyone?
The test case I have is public but it's a dojo test case for a dojo extension for firebug so it is not exactly a reduced case. ;-)
You need to log in
before you can comment on or make changes to this bug.
Description
•