Closed
Bug 875939
Opened 11 years ago
Closed 11 years ago
Make the conversion operator on Rooted return a const ref
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
Instead of a value. That way passing a Rooted<T> to a function taking |const T&| is not a GC hazard.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #753956 -
Flags: review?(terrence)
Comment 2•11 years ago
|
||
Comment on attachment 753956 [details] [diff] [review]
Make passing a Rooted<T> to a function taking |const T&| not be a gc hazard.
Review of attachment 753956 [details] [diff] [review]:
-----------------------------------------------------------------
r=me
::: js/public/RootingAPI.h
@@ +465,5 @@
> Rooted<T> *previous() { return prev; }
> #endif
>
> + // Important: Return a reference here so passing a Rooted to
> + // something that takes a const reference is not a GC hazard.
All of the other comments in this file use /* */ style, so we should probably stick with that here.
Attachment #753956 -
Flags: review?(terrence) → review+
Updated•11 years ago
|
Blocks: ExactRooting
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #753984 -
Flags: review?(terrence)
Assignee | ||
Updated•11 years ago
|
Attachment #753956 -
Attachment is obsolete: true
Updated•11 years ago
|
Attachment #753984 -
Flags: review?(terrence) → review+
Assignee | ||
Comment 4•11 years ago
|
||
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla24
Comment 5•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•