Closed Bug 560351 Opened 14 years ago Closed 14 years ago

"document.body.__lookupGetter__('lastChild')();" throws an uncatchable exception

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: mrbkap)

References

Details

(Keywords: testcase)

Attachments

(2 files)

Attached file testcase
Dunno if this is the same as bug 560328.
Attached patch Proposed fixSplinter Review
Assignee: nobody → mrbkap
Status: NEW → ASSIGNED
Attachment #442256 - Flags: review?(peterv)
Comment on attachment 442256 [details] [diff] [review]
Proposed fix

Grmbl, I was working on the exact same patch for bug 560328. I remember what happened here, I was going to look into changing the NS_ERROR_XPC_BAD_CONVERT_JS error into NS_ERROR_XPC_BAD_OP_ON_WN_PROTO. castNativeFromWrapper is used for unwrapping this and unwrapping args, and the slow-unwrapping versions of those have that difference in error code (see castNative and xpc_qsUnwrapArgImpl). So I guess its now up to you to decide whether we want to be consistent between fast and slow unwrapping :-).
Attachment #442256 - Flags: review?(peterv) → review+
Yeah, sorry. I patched this before realizing that the linked-to bug was a dupe (and that you had already taken it). I don't feel like it's worth keeping consistency here because NS_ERROR_XPC_BAD_OP_ON_WN_PROTO is so useless to anybody who isn't you, jst, bz, or me. IMO we should really go through XPConnect and fix the error reporting to actually mean something (in the rest of Gecko, it's hard to raise good exceptions because we don't know the calling language. In XPConnect, it seems like we should take the opportunity to throw real error messages out to JS).
http://hg.mozilla.org/mozilla-central/rev/d6d331e05fca
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: