Closed Bug 849536 Opened 8 years ago Closed 8 years ago

Allow GetGCThingTraceKind to work on Nursery things.

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: terrence, Assigned: terrence)

References

Details

Attachments

(1 file)

Attached patch v0Splinter Review
This is the fix for GetGCThingTraceKind that was requested in Bug 841059 Comment 11. I split it off because it depends on IsInsideNursery and wasn't part of the review for Bug 841059.
Attachment #723098 - Flags: review?(wmccloskey)
Comment on attachment 723098 [details] [diff] [review]
v0

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

::: js/src/jsgcinlines.h
@@ +200,5 @@
> +    JS_ASSERT(thing);
> +    const Cell *cell = static_cast<const Cell *>(thing);
> +#ifdef JSGC_GENERATIONAL
> +    if (IsInsideNursery(cell->runtime(), cell))
> +        return MapAllocToTraceKind(static_cast<const JSObject *>(cell)->getAllocKind());

This should just return JSTRACE_OBJECT since only objects are stored in the nursery.
Attachment #723098 - Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/mozilla-central/rev/29bff4ae6417
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.