Bug 1132224 - Propagate the delazification for Debugger flag when merging compartments. (r=jimb)

This commit is contained in:
Shu-yu Guo 2015-02-13 16:53:22 -08:00
parent 0407dc6d97
commit 276828b66d

View File

@ -6502,6 +6502,12 @@ gc::MergeCompartments(JSCompartment *source, JSCompartment *target)
source->clearTables();
source->unsetIsDebuggee();
// The delazification flag indicates the presence of LazyScripts in a
// compartment for the Debugger API, so if the source compartment created
// LazyScripts, the flag must be propagated to the target compartment.
if (source->needsDelazificationForDebugger())
target->scheduleDelazificationForDebugger();
// Release any relocated arenas which we may be holding on to as they might
// be in the source zone
rt->gc.releaseHeldRelocatedArenas();