Closed
Bug 1191529
Opened 9 years ago
Closed 9 years ago
Remove JSIdArray and AutoIdArray
Categories
(Core :: JavaScript: GC, defect)
Core
JavaScript: GC
Tracking
()
RESOLVED
FIXED
mozilla43
People
(Reporter: terrence, Assigned: terrence)
References
Details
Attachments
(2 files)
17.97 KB,
patch
|
jonco
:
review+
|
Details | Diff | Splinter Review |
5.69 KB,
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
JSIdArray is this wonderfully crufty piece of manual C-style memory mis-management that is still hanging on somehow. Its only user is JS_Enumerate. The actual work here happens into an AutoIdVector, after which we malloc and memcopy a second copy into a JSIdArray and return that so that the caller can root it with AutoId*Array*. Instead, let's just have the caller pass in a handle to an IdVector. Unfortunately, AutoIdVector is not really a vector, so we can't avoid the copy yet, but this should be fixed soon when we remove AutoIdVector.
Attachment #8643970 -
Flags: review?(jcoppeard)
Assignee | ||
Comment 1•9 years ago
|
||
Converting gecko to the new API was trivial: add an outparam and convert to standard SM return conventions.
Attachment #8643972 -
Flags: review?(bugs)
Comment 2•9 years ago
|
||
Comment on attachment 8643972 [details] [diff] [review] 2_remove_AutoIdArray_gecko-v0.diff I'm sure Andrew wants to review this ;)
Attachment #8643972 -
Flags: review?(bugs) → review?(continuation)
Updated•9 years ago
|
Attachment #8643972 -
Flags: review?(continuation) → review+
Comment 3•9 years ago
|
||
Comment on attachment 8643970 [details] [diff] [review] 1_remove_AutoIdArray_sm-v0.diff Review of attachment 8643970 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jsatom.h @@ -26,5 @@ > - js::HeapId* begin() { return vector; } > - const js::HeapId* begin() const { return vector; } > - js::HeapId* end() { return vector + length; } > - const js::HeapId* end() const { return vector + length; } > -}; Nice to see this go!
Attachment #8643970 -
Flags: review?(jcoppeard) → review+
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f8da9d2fc8dd
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•