зеркало из https://github.com/mozilla/gecko-dev.git
Bug 803376 - Remove old TRANSPLANT GCs (r=luke)
This commit is contained in:
Родитель
b852c9cf93
Коммит
ca4d072439
|
@ -1555,17 +1555,6 @@ JS_TransplantObject(JSContext *cx, JSObject *origobjArg, JSObject *targetArg)
|
|||
JS_ASSERT(!IsCrossCompartmentWrapper(origobj));
|
||||
JS_ASSERT(!IsCrossCompartmentWrapper(target));
|
||||
|
||||
/*
|
||||
* Transplantation typically allocates new wrappers in every compartment. If
|
||||
* an incremental GC is active, this causes every compartment to be leaked
|
||||
* for that GC. Hence, we finish any ongoing incremental GC before the
|
||||
* transplant to avoid leaks.
|
||||
*/
|
||||
if (IsIncrementalGCInProgress(cx->runtime)) {
|
||||
PrepareForIncrementalGC(cx->runtime);
|
||||
FinishIncrementalGC(cx->runtime, gcreason::TRANSPLANT);
|
||||
}
|
||||
|
||||
JSCompartment *destination = target->compartment();
|
||||
WrapperMap &map = destination->crossCompartmentWrappers;
|
||||
Value origv = ObjectValue(*origobj);
|
||||
|
|
Загрузка…
Ссылка в новой задаче