Right now the script debuggers always attach when you have the WebScriptDebuggerEnabled default set. This does not mean we have any registered listeners. When using a build that has these debuggers attached there is around a 50% performance impact on the JS 24Fun test. We need to lazily attach the debuggers to all frames when the first listener is added. Once all the listeners are detached we can then remove the listeners, regaining peek performance.
Created attachment 8976 [details] Implements the lazy attach
"Once all the listeners are removed we can then detach the debuggers, regaining peek performance."
Comment on attachment 8976 [details] Implements the lazy attach I would make these changes: - "Attaches a script debugger to all frames for the receiver." + "Attaches a script debugger to all frames belonging to the receiver." - @abstract Detaches any script debuggers from all frames for the receiver. + @abstract Detaches all script debuggers from all frames belonging to the receiver. r=me
Landed in r14990.