X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..HEAD:/runtime/VMEntryScope.cpp diff --git a/runtime/VMEntryScope.cpp b/runtime/VMEntryScope.cpp index a5e259f..b67dd69 100644 --- a/runtime/VMEntryScope.cpp +++ b/runtime/VMEntryScope.cpp @@ -36,7 +36,6 @@ namespace JSC { VMEntryScope::VMEntryScope(VM& vm, JSGlobalObject* globalObject) : m_vm(vm) , m_globalObject(globalObject) - , m_recompilationNeeded(false) { ASSERT(wtfThreadData().stack().isGrowingDownward()); if (!vm.entryScope) { @@ -51,8 +50,12 @@ VMEntryScope::VMEntryScope(VM& vm, JSGlobalObject* globalObject) 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() @@ -62,10 +65,8 @@ 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