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.
<rdar://problem/6425077>
Created attachment 26284 [details] Proposed patch
Landed in r39497.