RESOLVED FIXED 23016
JavaScriptDebugServer::recompileAllJSFunctions() should not execute JS while reparsing all functions
https://bugs.webkit.org/show_bug.cgi?id=23016
Summary JavaScriptDebugServer::recompileAllJSFunctions() should not execute JS while ...
Cameron Zwarich (cpst)
Reported 2008-12-28 15:50:21 PST
JavaScriptDebugServer::recompileAllJSFunctions() calls sourceParsed() while reparsing all JS functions, which will execute JS in the inspector. Depending on the order in which functions are recompiled, a function could have a new body but other functions that have not been recompiled could have an optimized (in the sense of inline caching) call to it, bypassing the check of whether or not there is generated bytecode. This leads to a crash caused by accessing indices off of a null pointer. The fix is to just make the calls to sourceParsed() after reparsing all functions. As a side note, it seems like a poor idea to add debug hooks to all inspector JS. This is probably a significant performance hit for the inspector.
Attachments
Proposed patch (3.10 KB, patch)
2008-12-28 16:02 PST, Cameron Zwarich (cpst)
sam: review+
Cameron Zwarich (cpst)
Comment 1 2008-12-28 15:50:49 PST
Cameron Zwarich (cpst)
Comment 2 2008-12-28 16:02:28 PST
Created attachment 26284 [details] Proposed patch
Cameron Zwarich (cpst)
Comment 3 2008-12-28 17:35:39 PST
Landed in r39497.
Note You need to log in before you can comment on or make changes to this bug.