Closed Bug 860704 Opened 7 years ago Closed 7 years ago

GC: Comment says RawT converts to RootedT

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

Attached patch Proposed fixSplinter Review
The comment at the top of RootingAPI.h says that RawT is convertible to RootedT which it is not.  Also there are a couple of other bits that need updating.
Attachment #736221 - Flags: review?(terrence)
Comment on attachment 736221 [details] [diff] [review]
Proposed fix

Review of attachment 736221 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks! That's a huge improvement.

::: js/public/RootingAPI.h
@@ -57,5 @@
>   *
>   * - Rooted<T> declares a variable of type T, whose value is always rooted.
>   *   Rooted<T> may be automatically coerced to a Handle<T>, below. Rooted<T>
>   *   should be used whenever a local variable's value may be held live across a
> - *   call which can trigger a GC. This is generally true of

It seems I'm not very good at

@@ +99,2 @@
>   *
> + * Currently all of these types have an implicit conversion to RawT. These are

, after Currently.
Attachment #736221 - Flags: review?(terrence) → review+
https://hg.mozilla.org/mozilla-central/rev/a409636a0f32
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.