VMEntryScope::VMEntryScope(VM& vm, JSGlobalObject* globalObject)
: m_vm(vm)
, m_globalObject(globalObject)
- , m_recompilationNeeded(false)
{
ASSERT(wtfThreadData().stack().isGrowingDownward());
if (!vm.entryScope) {
vm.resetDateCache();
}
- // Clear the captured exception stack between entries
- vm.clearExceptionStack();
+ vm.clearLastException();
+}
+
+void VMEntryScope::setEntryScopeDidPopListener(void* key, EntryScopeDidPopListener listener)
+{
+ m_allEntryScopeDidPopListeners.set(key, listener);
}
VMEntryScope::~VMEntryScope()
m_vm.entryScope = nullptr;
- if (m_recompilationNeeded) {
- if (Debugger* debugger = m_globalObject->debugger())
- debugger->recompileAllJSFunctions(&m_vm);
- }
+ for (auto& listener : m_allEntryScopeDidPopListeners.values())
+ listener(m_vm, m_globalObject);
}
} // namespace JSC