Bug 1111201: Check for OOM when calling an asm.js function with new; r=evilpie

This commit is contained in:
Benjamin Bouvier 2015-10-06 11:59:30 +02:00
parent 5381d57cba
commit d26e469b50

View File

@ -768,6 +768,8 @@ CallAsmJS(JSContext* cx, unsigned argc, Value* vp)
// functions, the returned value is discarded and an empty object is
// returned instead.
PlainObject* obj = NewBuiltinClassInstance<PlainObject>(cx);
if (!obj)
return false;
callArgs.rval().set(ObjectValue(*obj));
return true;
}