[INFER] Finalize 'new' script objects in background when possible, bug 678048.

This commit is contained in:
Brian Hackett 2011-08-11 20:56:17 -07:00
parent 88486c366a
commit bff5c4b010

View File

@ -1532,6 +1532,9 @@ NewObjectWithType(JSContext *cx, types::TypeObject *type, JSObject *parent, gc::
{
JS_ASSERT(type == type->proto->newType);
if (CanBeFinalizedInBackground(kind, &js_ObjectClass))
kind = GetBackgroundFinalizeKind(kind);
JSObject* obj = js_NewGCObject(cx, kind);
if (!obj)
goto out;