X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..HEAD:/jit/JITExceptions.cpp?ds=sidebyside diff --git a/jit/JITExceptions.cpp b/jit/JITExceptions.cpp index 1375ae6..4f6d9e8 100644 --- a/jit/JITExceptions.cpp +++ b/jit/JITExceptions.cpp @@ -40,15 +40,17 @@ namespace JSC { -void genericUnwind(VM* vm, ExecState* callFrame, JSValue exceptionValue) +void genericUnwind(VM* vm, ExecState* callFrame) { if (Options::breakOnThrow()) { dataLog("In call frame ", RawPointer(callFrame), " for code block ", *callFrame->codeBlock(), "\n"); CRASH(); } - RELEASE_ASSERT(exceptionValue); - HandlerInfo* handler = vm->interpreter->unwind(callFrame, exceptionValue); // This may update callFrame. + Exception* exception = vm->exception(); + RELEASE_ASSERT(exception); + VMEntryFrame* vmEntryFrame = vm->topVMEntryFrame; + HandlerInfo* handler = vm->interpreter->unwind(vmEntryFrame, callFrame, exception); // This may update vmEntryFrame and callFrame. void* catchRoutine; Instruction* catchPCForInterpreter = 0; @@ -62,6 +64,7 @@ void genericUnwind(VM* vm, ExecState* callFrame, JSValue exceptionValue) } else catchRoutine = LLInt::getCodePtr(handleUncaughtException); + vm->vmEntryFrameForThrow = vmEntryFrame; vm->callFrameForThrow = callFrame; vm->targetMachinePCForThrow = catchRoutine; vm->targetInterpreterPCForThrow = catchPCForInterpreter;