Bug 858783 - Check user-controlled asm.js flag. r=luke

This commit is contained in:
Sean Stangl 2013-04-11 11:39:59 -07:00
parent 5db35d415f
commit 011ea7d86f

View File

@ -5529,7 +5529,8 @@ js::IsAsmJSCompilationAvailable(JSContext *cx, unsigned argc, Value *vp)
#ifdef JS_ASMJS
bool available = JSC::MacroAssembler().supportsFloatingPoint() &&
!cx->compartment->debugMode();
!cx->compartment->debugMode() &&
cx->hasOption(JSOPTION_ASMJS);
#else
bool available = false;
#endif