Closed
Bug 742156
Opened 13 years ago
Closed 13 years ago
Stringifying EventTarget throws
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: bzbarsky, Assigned: peterv)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
5.89 KB,
patch
|
bzbarsky
:
review+
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Testcase:
javascript:alert(EventTarget)
the issue is we're calling Function.prototype.toString. We never added an own toString on our interface objects....
![]() |
Reporter | |
Updated•13 years ago
|
tracking-firefox14:
--- → ?
Assignee | ||
Comment 1•13 years ago
|
||
This is causing orange on the Jetpack tests.
Assignee: nobody → peterv
Status: NEW → ASSIGNED
Comment 2•13 years ago
|
||
(In reply to Peter Van der Beken [:peterv] from comment #1)
> Created attachment 612126 [details] [diff] [review]
> v1
>
> This is causing orange on the Jetpack tests.
Tracking for release to prevent issues hiding behind these orange tests. Let's go with the simplest fix (test or code change) to get this working again.
If that's not the only reason to track this bug for release, please clarify. Thanks!
Assignee | ||
Comment 3•13 years ago
|
||
Attachment #612126 -
Attachment is obsolete: true
Attachment #620287 -
Flags: review?(bzbarsky)
![]() |
Reporter | |
Comment 4•13 years ago
|
||
Comment on attachment 620287 [details] [diff] [review]
v1.1
>+++ b/dom/bindings/Utils.cpp
>+// passed a non-Function object we als need to provide our own toString method
s/als/also/
>+InterfaceObjectToString(JSContext* cx, unsigned argc, JS::Value *vp)
>+ JS::Value thisv = JS_THIS(cx, vp);
You could use JS_THIS_OBJECT and then just null-check it; then no need for thisv.
Note that JS_THIS always returns either JSVAL_NULL or an ObjectValue(), so the "undefined" case can't even be hit here.
r=me with those fixed.
Attachment #620287 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 5•13 years ago
|
||
Target Milestone: --- → mozilla15
Comment 6•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 7•13 years ago
|
||
Comment on attachment 620287 [details] [diff] [review]
v1.1
[Approval Request Comment]
Regression caused by (bug #): bug 740069
User impact if declined: seems to break Jetpack tests, not sure if it affects addons. Could cause website breakage due to unexpected exceptions.
Testing completed (on m-c, etc.): landed on m-c (and has a testcase)
Risk to taking this patch (and alternatives if risky): low-risk
String changes made by this patch: None
Attachment #620287 -
Flags: approval-mozilla-aurora?
Comment 8•13 years ago
|
||
Comment on attachment 620287 [details] [diff] [review]
v1.1
[Triage Comment]
Approving for Aurora 14.
Attachment #620287 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 9•13 years ago
|
||
status-firefox14:
--- → fixed
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
•