Closed
Bug 866134
Opened 12 years ago
Closed 12 years ago
GC: Address reported TokenStream::Position rooting hazards
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(1 file)
(deleted),
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
There are currently 9 hazards reported relating to TokenStream::Position. These are false positives since AutoKeepAtoms is in effect when TokenStream in use, so the atoms contained in Position are not going to be collected.
To get rid of these hazards, I've made Position take a dummy AutoKeepAtoms reference in its constructor to ensure that one of these is present, and told the static analysis to regard it as rooted. I've also marked Position and AutoKeepAtoms as stack-only classes for good measure.
I'm hoping you agree this is a sensible thing to do :-)
Attachment #742397 -
Flags: review?(sphink)
Comment 1•12 years ago
|
||
Comment on attachment 742397 [details] [diff] [review]
Proposed changes
Review of attachment 742397 [details] [diff] [review]:
-----------------------------------------------------------------
I like it. Requiring the AutoKeep reference makes it way harder to use this incorrectly in the future.
Attachment #742397 -
Flags: review?(sphink) → review+
Assignee | ||
Comment 2•12 years ago
|
||
Comment 3•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in
before you can comment on or make changes to this bug.
Description
•