Closed
Bug 684083
Opened 13 years ago
Closed 13 years ago
crash nsXPCWrappedJSClass::CallQueryInterfaceOnJSObject calling Components.utils.getWeakReference(undefined)
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla9
People
(Reporter: mark.yen, Assigned: innomotive)
Details
(Keywords: crash, Whiteboard: [good first bug] [mentor=jdm])
Crash Data
Attachments
(1 file, 2 obsolete files)
1002 bytes,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
This bug was filed from the Socorro interface and is report bp-5c51e855-6c33-4d53-9249-326872110901 . ============================================================= STR: 1) Open error console 2) Evaluate: Components.utils.getWeakReference(undefined) Expected results: "undefined", possibly, or "null". Actual results: crash. Additional information: Calling Components.utils.getWeakReference() (with no arguments) doesn't crash; it's only if you supplied undefined as the argument. Pretty sure you can't reach getWeakReference from unprivileged script...
Comment 1•13 years ago
|
||
The first step here for a new contributor taking this bug on would be to reproduce the crash under gdb.
Whiteboard: [good first bug] [mentor=jdm]
Updated•13 years ago
|
Assignee: nobody → innomotive
Updated•13 years ago
|
Attachment #560115 -
Flags: review?(mrbkap)
Comment 4•13 years ago
|
||
Comment on attachment 560115 [details] [diff] [review] Proposed patch Review of attachment 560115 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for the patch! It looks good, but there's a little more cleanup to be done here. ::: js/src/xpconnect/src/xpcJSWeakReference.cpp @@ +75,3 @@ > > JSObject *obj; > if (!JS_ValueToObject(cx, argv[0], &obj)) Since the if statement above excludes primitives, we know here that argv[0] is an object. So instead of calling JS_ValueToObject, this can just set obj to JSVAL_TO_OBJECT(argv[0]).
Attachment #560115 -
Flags: review?(mrbkap)
Patch with review points from Comment 4 included. Should be applied after the previous patch.
Attachment #560303 -
Flags: review?
Patch that consolidates previous two patches. Please review.
Attachment #560115 -
Attachment is obsolete: true
Attachment #560303 -
Attachment is obsolete: true
Attachment #560303 -
Flags: review?
Attachment #560313 -
Flags: review?(mrbkap)
Attachment #560313 -
Flags: review?(josh)
Comment 7•13 years ago
|
||
Comment on attachment 560313 [details] [diff] [review] Proposed patch (pass 3) This is all in Blake's hands.
Attachment #560313 -
Flags: review?(josh)
Comment 8•13 years ago
|
||
Comment on attachment 560313 [details] [diff] [review] Proposed patch (pass 3) Looks great! Thanks again.
Attachment #560313 -
Flags: review?(mrbkap) → review+
Comment 10•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2b458be3c7b7 Thanks a lot Hari for your patch! This was a great first patch, and I do hope to see you around in Bugzilla more often. :-)
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
You need to log in
before you can comment on or make changes to this bug.
Description
•