Changeset 188846 in webkit for trunk/Source/JavaScriptCore/runtime/VM.cpp
- Timestamp:
- Aug 23, 2015, 7:07:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/VM.cpp
r188824 r188846 87 87 #include "TypeProfilerLog.h" 88 88 #include "UnlinkedCodeBlock.h" 89 #include "VMEntryScope.h" 89 90 #include "Watchdog.h" 90 91 #include "WeakGCMapInlines.h" … … 471 472 } 472 473 474 void VM::whenIdle(std::function<void()> callback) 475 { 476 if (!entryScope) { 477 callback(); 478 return; 479 } 480 481 entryScope->addDidPopListener(callback); 482 } 483 473 484 void VM::deleteAllCode() 474 485 { 475 m_codeCache->clear(); 476 m_regExpCache->deleteAllCode(); 486 whenIdle([this]() { 487 m_codeCache->clear(); 488 m_regExpCache->deleteAllCode(); 477 489 #if ENABLE(DFG_JIT) 478 DFG::completeAllPlansForVM(*this); 479 #endif 480 heap.deleteAllCompiledCode(); 481 heap.deleteAllUnlinkedFunctionCode(); 482 heap.reportAbandonedObjectGraph(); 490 DFG::completeAllPlansForVM(*this); 491 #endif 492 heap.deleteAllCompiledCode(); 493 heap.deleteAllUnlinkedFunctionCode(); 494 heap.reportAbandonedObjectGraph(); 495 }); 483 496 } 484 497
Note:
See TracChangeset
for help on using the changeset viewer.