Closed
Bug 500349
Opened 16 years ago
Closed 16 years ago
DOMParser no longer available in Greasemonkey scripts
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
VERIFIED
FIXED
mozilla1.9.2a1
| Tracking | Status | |
|---|---|---|
| status1.9.2 | --- | beta1-fixed |
People
(Reporter: jruderman, Assigned: peterv)
References
Details
(Keywords: regression, testcase)
Attachments
(3 files)
|
352 bytes,
text/javascript
|
Details | |
|
266 bytes,
text/html
|
Details | |
|
1.07 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
In a Greasemonkey script, if I try to use "new DOMParser()", I get "ReferenceError: DOMParser is not defined".
Works on 1.9.1 branch, fails on mozilla-central.
This breaks my "Valid XHTML" Greasemonkey script, which I use while I'm editing blog posts.
Comment 1•16 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/fa9c9caa3886
Works:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090621 Minefield/3.6a1pre ID:20090621000409
Fails:
http://hg.mozilla.org/mozilla-central/rev/a8daae5ef5ce
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090621 Minefield/3.6a1pre ID:20090621093954
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=fa9c9caa3886&tochange=a8daae5ef5ce
| Reporter | ||
Comment 2•16 years ago
|
||
I suspect bug 484764, since that is known to have caused another regression involving dom parser, bug 500071.
| Reporter | ||
Updated•16 years ago
|
Flags: blocking1.9.2?
Comment 3•16 years ago
|
||
Comment 4•16 years ago
|
||
As Jesse guessed, this is a regression from bug 484764. The problem is that we now rely on nsDOMClassInfo::PostCreatePrototype to resolve the constructor on the window. However, when we're resolving through an XPCNativeWrapper (or, technically, a cross origin XOW with special privileges) we *don't* want to resolve onto the window, we want to resolve onto the wrapper.
It isn't immediately clear to me how we should fix this. I'm hoping peterv has ideas, though!
Blocks: 484764
Comment 5•16 years ago
|
||
(oh, the testcase should alert "true").
| Assignee | ||
Updated•16 years ago
|
Assignee: nobody → peterv
Status: NEW → ASSIGNED
| Assignee | ||
Updated•16 years ago
|
Attachment #386325 -
Attachment is patch: false
Attachment #386325 -
Attachment mime type: text/plain → text/html
| Assignee | ||
Comment 6•16 years ago
|
||
This fixes attachment 386325 [details], still need to test with Greasemonkey.
Comment 7•16 years ago
|
||
If there is tryserver build, I am very glad
| Assignee | ||
Comment 8•16 years ago
|
||
Comment on attachment 389617 [details] [diff] [review]
v1
This makes us do what the old code did. I think checking for |obj != aWin->GetGlobalJSObject()| should be ok, don't think I should check for XPCNativeWrapper here. Fixes the Greasemonkey testcase and Blake's testcase (I'll make a mochitest out of that one).
Attachment #389617 -
Flags: superreview?(mrbkap)
Attachment #389617 -
Flags: review?(jst)
Updated•16 years ago
|
Attachment #389617 -
Flags: superreview?(mrbkap)
Attachment #389617 -
Flags: superreview+
Attachment #389617 -
Flags: review?(jst)
Attachment #389617 -
Flags: review+
Updated•16 years ago
|
Flags: blocking1.9.2? → blocking1.9.2+
Priority: -- → P2
| Assignee | ||
Comment 9•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Comment 10•16 years ago
|
||
Why was there another file deleted in that changeset?
| Assignee | ||
Comment 11•16 years ago
|
||
(In reply to comment #10)
> Why was there another file deleted in that changeset?
I don't really know how that happened. I've backed out and relanded (twice, because rebase screwed me and somehow emptied my patch).
Backout:
http://hg.mozilla.org/mozilla-central/rev/6d21a1f54673
http://hg.mozilla.org/mozilla-central/rev/a5105991af66
Relanding 1 (empty changeset, rebase's fault):
http://hg.mozilla.org/mozilla-central/rev/793a3c7590b7
Relanding 2:
http://hg.mozilla.org/mozilla-central/rev/c2cc58728c8b
Comment 12•16 years ago
|
||
Mass change: adding fixed1.9.2 keyword
(This bug was identified as a mozilla1.9.2 blocker which was fixed before the mozilla-1.9.2 repository was branched (August 13th, 2009) as per this query: http://is.gd/2ydcb - if this bug is not actually fixed on mozilla1.9.2, please remove the keyword. Apologies for the bugspam)
Keywords: fixed1.9.2
Updated•16 years ago
|
status1.9.2:
--- → beta1-fixed
Keywords: fixed1.9.2
Comment 13•16 years ago
|
||
verified FIXED on builds:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a2pre) Gecko/20090904 Namoroka/3.6a2pre ID:20090904033959
and
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a1pre) Gecko/20090904 Minefield/3.7a1pre ID:20090904030702
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•