diff --git a/js/src/asmjs/AsmJSLink.cpp b/js/src/asmjs/AsmJSLink.cpp index ff57b8f8f0e..78f3d64b120 100644 --- a/js/src/asmjs/AsmJSLink.cpp +++ b/js/src/asmjs/AsmJSLink.cpp @@ -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(cx); + if (!obj) + return false; callArgs.rval().set(ObjectValue(*obj)); return true; }