Closed
Bug 332514
Opened 18 years ago
Closed 18 years ago
Passing null to Sandbox constructor crashes
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bugzilla-mozilla-20000923, Assigned: bugzilla-mozilla-20000923)
Details
(Keywords: crash)
Attachments
(2 files, 1 obsolete file)
18.49 KB,
text/plain
|
Details | |
999 bytes,
patch
|
brendan
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
The following JS code crashes on trunk (not checked branches): new Components.utils.Sandbox(null)
Assignee | ||
Comment 1•18 years ago
|
||
Assignee | ||
Comment 2•18 years ago
|
||
With this patch, the same code produces the following exception: JavaScript error: , line 0: uncaught exception: [Exception... "Illegal value" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: javascript: new Components.utils.Sandbox(null) :: <TOP_LEVEL> :: line 1" data: no]
Assignee | ||
Updated•18 years ago
|
Attachment #216975 -
Flags: review? → review?(brendan)
Comment 3•18 years ago
|
||
Comment on attachment 216975 [details] [diff] [review] Don't try and use null as an object Use !JSVAL_IS_PRIMITIVE(argv[0]) instead of that && expression, and r=me. /be
Assignee | ||
Comment 4•18 years ago
|
||
Attachment #216975 -
Attachment is obsolete: true
Attachment #216981 -
Flags: review?(brendan)
Attachment #216975 -
Flags: review?(brendan)
Comment 5•18 years ago
|
||
Comment on attachment 216981 [details] [diff] [review] Use JSVAL_IS_PRIMITIVE instead Thanks, r=me. /be
Attachment #216981 -
Flags: review?(brendan) → review+
Assignee | ||
Updated•18 years ago
|
Attachment #216981 -
Flags: superreview?(jst)
Comment 6•18 years ago
|
||
Comment on attachment 216981 [details] [diff] [review] Use JSVAL_IS_PRIMITIVE instead sr=jst
Attachment #216981 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Comment 7•18 years ago
|
||
Checked in --> FIXED. Might be good to stick onto the 1.8 branch too; who should approve that?
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•