Bug 803376 - Remove old TRANSPLANT GCs (r=luke)

This commit is contained in:
Bill McCloskey 2012-10-18 16:48:22 -07:00
Родитель b852c9cf93
Коммит ca4d072439
1 изменённых файлов: 0 добавлений и 11 удалений

Просмотреть файл

@ -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);