Bug 1181908 part 1. Fix support for JSOP_OBJECT in scripts parsed on background threads by clearing the unboxedLayouts list on the background thread parsing compartment when merging the parse result to the target compartment. r=jandem

This commit is contained in:
Brian Hackett 2015-08-28 17:03:48 -04:00
parent e62fe94d22
commit 2f164e8394

View File

@ -6655,6 +6655,12 @@ gc::MergeCompartments(JSCompartment* source, JSCompartment* target)
ObjectGroup* group = iter.get<ObjectGroup>();
group->setGeneration(target->zone()->types.generation);
group->compartment_ = target;
// Remove any unboxed layouts from the list in the off thread
// compartment. These do not need to be reinserted in the target
// compartment's list, as the list is not required to be complete.
if (UnboxedLayout* layout = group->maybeUnboxedLayoutDontCheckGeneration())
layout->detachFromCompartment();
}
// Fixup zone pointers in source's zone to refer to target's zone.