Closed
Bug 204138
Opened 23 years ago
Closed 23 years ago
Cannot enumerate all event properties without exceptions being thrown
Categories
(Core :: DOM: Events, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: hjtoi-bugzilla, Assigned: bryner)
Details
(Keywords: regression, topembed+, Whiteboard: [adt2])
Attachments
(2 files)
|
334 bytes,
text/html
|
Details | |
|
946 bytes,
patch
|
danm.moz
:
review+
jst
:
superreview+
asa
:
approval1.4+
|
Details | Diff | Splinter Review |
JavaScript: The Definitive Guide and other sources recommend a small snippet of
code to enumerate all the properties of an object; it goes roughly like this:
var eventProperties = "";
for (prop in e) {
eventProperties += prop + " : '" + e[prop] + "'\n";
}
Doing this for event object stopped working some time after 1.0. Now you get an
exception thrown:
* Call to xpconnect wrapped JSObject produced this error: *
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)
[nsIDOMPopupBlockedEvent.requestingWindowURI]" nsresult: "0x80004005
(NS_ERROR_FAILURE)" location: "JS frame ::
http://www.mozilla.org/xmlextras/get.xhtml :: myfunc :: line 57" data: no]
I'll attach a testcase.
| Reporter | ||
Comment 1•23 years ago
|
||
| Reporter | ||
Updated•23 years ago
|
Flags: blocking1.4b?
Comment 2•23 years ago
|
||
adt: nsbeta1+/adt2
Updated•23 years ago
|
Flags: blocking1.4b?
Flags: blocking1.4b-
Flags: blocking1.4?
Comment 6•23 years ago
|
||
Discussed in topembed bug triage. Plussing.
| Assignee | ||
Comment 7•23 years ago
|
||
| Assignee | ||
Updated•23 years ago
|
Attachment #123192 -
Flags: superreview?(jst)
Attachment #123192 -
Flags: review?(danm)
Comment 8•23 years ago
|
||
Comment on attachment 123192 [details] [diff] [review]
fix
+ NS_WARNING("Tried to get requestingWindowURI for non-popupblocked event!");
Given that this code will be trigged if someone simply enumerates the
properties of an event, I don't like this warning. I'd say take it out.
sr=jst
Attachment #123192 -
Flags: superreview?(jst) → superreview+
Attachment #123192 -
Flags: review?(danm) → review+
| Assignee | ||
Updated•23 years ago
|
Attachment #123192 -
Flags: approval1.4?
Comment 9•23 years ago
|
||
Comment on attachment 123192 [details] [diff] [review]
fix
a=asa (on behalf of drivers) for checkin to 1.4
Attachment #123192 -
Flags: approval1.4? → approval1.4+
| Assignee | ||
Comment 10•23 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•