Changeset 167396 in webkit
- Timestamp:
- Apr 16, 2014 4:07:49 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r167394 r167396 1 2014-04-16 Mark Lam <mark.lam@apple.com> 2 3 Crash in CodeBlock::setOptimizationThresholdBasedOnCompilationResult() when the debugger activates. 4 <https://webkit.org/b/131747> 5 6 Reviewed by Filip Pizlo. 7 8 When the debugger is about to activate (e.g. enter stepping mode), it first 9 waits for all DFG compilations to complete. However, when the DFG completes, 10 if compilation is successful, it will install a new DFG codeBlock. The 11 CodeBlock installation process is required to register codeBlocks with the 12 debugger. Debugger::registerCodeBlock() will eventually call 13 CodeBlock::setSteppingMode() which may jettison the DFG codeBlock that we're 14 trying to install. Thereafter, chaos ensues. 15 16 This jettison'ing only happens because the debugger currently set its 17 m_steppingMode flag before waiting for compilation to complete. The fix is 18 simply to set that flag only after compilation is complete. 19 20 * debugger/Debugger.cpp: 21 (JSC::Debugger::setSteppingMode): 22 (JSC::Debugger::registerCodeBlock): 23 1 24 2014-04-16 Filip Pizlo <fpizlo@apple.com> 2 25 -
trunk/Source/JavaScriptCore/debugger/Debugger.cpp
r165005 r167396 233 233 void Debugger::setSteppingMode(SteppingMode mode) 234 234 { 235 if (mode == m_steppingMode) 236 return; 235 if (mode == m_steppingMode || !m_vm) 236 return; 237 238 m_vm->waitForCompilationsToComplete(); 239 237 240 m_steppingMode = mode; 238 239 if (!m_vm)240 return;241 241 SetSteppingModeFunctor functor(this, mode); 242 forEachCodeBlock(functor);242 m_vm->heap.forEachCodeBlock(functor); 243 243 } 244 244 245 245 void Debugger::registerCodeBlock(CodeBlock* codeBlock) 246 246 { 247 // FIXME: We should never have to jettison a code block (due to pending breakpoints 248 // or stepping mode) that is being registered. operationOptimize() should have 249 // prevented the optimizing of such code blocks in the first place. Find a way to 250 // express this with greater clarity in the code. See <https://webkit.org/b131771>. 247 251 applyBreakpoints(codeBlock); 248 252 if (isStepping())
Note: See TracChangeset
for help on using the changeset viewer.