diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 3a959309d051..cc6cb94ffaec 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -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);