Create a more generic way for VMEntryScope to notify those interested that it will...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Aug 2014 22:04:39 +0000 (22:04 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Aug 2014 22:04:39 +0000 (22:04 +0000)
commit23841514d3d3971ab4270bfd104478d76b8f17c2
treea56590f99458e86291712ec594432572d9a15c0f
parent639839a13ac187b00bdc631a870085502685976f
Create a more generic way for VMEntryScope to notify those interested that it will be destroyed
https://bugs.webkit.org/show_bug.cgi?id=135358

Patch by Saam Barati <sbarati@apple.com> on 2014-08-04
Reviewed by Geoffrey Garen.

When VMEntryScope is destroyed, and it has a flag set indicating that the
Debugger needs to recompile all functions, it calls Debugger::recompileAllJSFunctions.
This flag is only used by Debugger to have VMEntryScope notify it when the
Debugger is safe to recompile all functions. This patch will substitute this
Debugger-specific recompilation flag with a list of callbacks that are notified
when the outermost VMEntryScope dies. This creates a general purpose interface
for being notified when the VM stops executing code via the event of the outermost
VMEntryScope dying.

* debugger/Debugger.cpp:
(JSC::Debugger::recompileAllJSFunctions):
* runtime/VMEntryScope.cpp:
(JSC::VMEntryScope::VMEntryScope):
(JSC::VMEntryScope::addEntryScopeDidPopListener):
(JSC::VMEntryScope::~VMEntryScope):
* runtime/VMEntryScope.h:
(JSC::VMEntryScope::setRecompilationNeeded): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/debugger/Debugger.cpp
Source/JavaScriptCore/runtime/VMEntryScope.cpp
Source/JavaScriptCore/runtime/VMEntryScope.h