Closed
Bug 630939
Opened 14 years ago
Closed 14 years ago
Constructor function name retrieved incorrectly
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | .x+ |
People
(Reporter: sfink, Unassigned)
Details
(Whiteboard: [fixed-in-tracemonkey])
Attachments
(1 file)
1.76 KB,
patch
|
timeless
:
review+
|
Details | Diff | Splinter Review |
When JSD grabs the name of a constructor to hold onto, it uses incorrect types and interprets a JSString* as a char*. This would produce an invalid string, and a possible crash from reading invalid memory. I haven't observed any negative effects; I just noticed the compile warning.
Reporter | ||
Comment 1•14 years ago
|
||
Attachment #509171 -
Flags: review?(timeless)
Comment 2•14 years ago
|
||
Seems not to be a regression, so I think it doesn't block. We'll gladly approve it for landing though if it gets r+.
blocking2.0: ? → .x
Comment on attachment 509171 [details] [diff] [review]
Convert JSString to char* for constructor names
sorry, this definitely feels like a regression from when someone changed the JS api to hand out Id's instead of Char*s.
please try to match file style until file style is cleaned up.
that means
+ if ( (ctorName = JS_EncodeString(cx, ctorNameStr)) ) {
should be:
+ if( (ctorName = JS_EncodeString(cx, ctorNameStr)) ) {
Note that I do not happen to like this style, it's merely the style the file uses and as I've been noting elsewhere I have been unable to get it changed because I couldn't get reviews for anything.
Attachment #509171 -
Flags: review?(timeless) → review+
Reporter | ||
Comment 4•14 years ago
|
||
Whiteboard: [fixed-in-tracemonkey]
Reporter | ||
Comment 5•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•13 years ago
|
Component: JavaScript Debugging/Profiling APIs → JavaScript Engine
You need to log in
before you can comment on or make changes to this bug.
Description
•