Closed
Bug 486297
Opened 16 years ago
Closed 14 years ago
Removal of struct JSProperty definition
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: igor, Assigned: igor)
References
(Blocks 1 open bug)
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
|
5.81 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
Currently JSProperty is defined as a struct with the single id member field but the code never dereference JSProperty except in one single place in jsarray.cpp that I added in bug 486106 and that can be trivially avoided.
Thus I suggest to remove JSProperty struct definition and just keep it as an opaque pointer typedef.
This would also allow to change lookupProperty to return JSProperty instead of using pass-by-the pointer out param. To distinguish a failure from not-found condition the code can simply define (JSProperty *) 1 as a value indicating an error. But this can go to another bug.
| Assignee | ||
Comment 1•16 years ago
|
||
The patch removes the definition of JSProperty struct and moves its typedef from jspubtd.h to jsprvtd.h .
Attachment #370393 -
Flags: review?(brendan)
| Assignee | ||
Updated•16 years ago
|
Attachment #370393 -
Flags: review?(brendan) → review?(mrbkap)
Updated•16 years ago
|
Attachment #370393 -
Flags: review?(mrbkap) → review+
| Assignee | ||
Comment 2•16 years ago
|
||
landed to TM - http://hg.mozilla.org/tracemonkey/rev/bd50ffde19c8
I nominate this for 1.9.1 to make sure on that branch as well that the code never dereference JSProperty. That would immediately leads to bugs due to a usage like (JSProperty *) 1 in liveconnect.
Flags: wanted1.9.1?
Whiteboard: fixed-in-tracemonkey
Comment 3•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•13 years ago
|
Flags: wanted1.9.1?
You need to log in
before you can comment on or make changes to this bug.
Description
•