Bug 959208 - Handle OOM in CloneObject. r=jandem

--HG--
extra : rebase_source : 3832f184a7a0f81efcead90460dfcb95efb90f41
This commit is contained in:
Christian Holler 2014-01-13 17:03:01 +01:00
Родитель ba15bf21fd
Коммит 61c08ebc86
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -891,7 +891,7 @@ CloneObject(JSContext *cx, HandleObject srcObj, CloneMemory &clonedObjects)
clone = CloneFunctionObject(cx, fun, cx->global(), kind, TenuredObject);
// To be able to re-lazify the cloned function, its name in the
// self-hosting compartment has to be stored on the clone.
if (hasName)
if (clone && hasName)
clone->as<JSFunction>().setExtendedSlot(0, StringValue(fun->atom()));
}
} else if (srcObj->is<RegExpObject>()) {