Open Bug 1728941 Opened 4 years ago Updated 1 year ago

Debugger::createSource will print spurious "Asm.js optimizer disabled because debugger is active" error

Categories

(Core :: JavaScript: WebAssembly, defect, P5)

defect

Tracking

()

People

(Reporter: lth, Unassigned)

References

Details

The Debugger::createSource function is called by the debugger for reasons I haven't explored deeply. In particular, createSource is called when the console is opened due to bug 1719615, which turns the debugger on at that point. createSource ends up calling JS::Compile to compile the code. When the code is asm.js, this will delegate to the asm.js compiler. The asm.js compiler will find that the debugger is active (shocking) and will therefore fallback to the JS compiler with an error printed to the console, "Asm.js optimizer disabled because debugger is active". The message is correct but we do not want it printed in this situation because it really confuses anyone who is watching, ie everyone, since the console is now open.

A plausible fix here is to silence the asm.js compiler in this situation: errors generated during bailouts from EstablishPreconditions should not be printed. createSource would want to pass in a switch to cause this silencing.

Even if bug 1719615 were to be fixed, the present bug would show up in other contexts, though probably less harmfully so.

Also see bug 1728278, which has a test case if you need it.

Priority: P3 → P5
See Also: → 1931087
You need to log in before you can comment on or make changes to this bug.