From 32761a6cee1d0dee366b885b7b9c777e67885688 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Sun, 10 Apr 2016 09:28:39 +0000 Subject: webkitgtk-2.4.11 --- Source/JavaScriptCore/jit/JITExceptions.cpp | 33 ++++++++--------------------- 1 file changed, 9 insertions(+), 24 deletions(-) (limited to 'Source/JavaScriptCore/jit/JITExceptions.cpp') diff --git a/Source/JavaScriptCore/jit/JITExceptions.cpp b/Source/JavaScriptCore/jit/JITExceptions.cpp index cf2ea28af..8084f773b 100644 --- a/Source/JavaScriptCore/jit/JITExceptions.cpp +++ b/Source/JavaScriptCore/jit/JITExceptions.cpp @@ -27,53 +27,38 @@ #include "JITExceptions.h" #include "CallFrame.h" +#include "CallFrameInlines.h" #include "CodeBlock.h" #include "Interpreter.h" +#include "JITStubs.h" #include "JSCJSValue.h" #include "LLIntData.h" #include "LLIntOpcode.h" #include "LLIntThunks.h" #include "Opcode.h" -#include "JSCInlines.h" +#include "Operations.h" #include "VM.h" namespace JSC { -void genericUnwind(VM* vm, ExecState* callFrame, UnwindStart unwindStart) +void genericUnwind(VM* vm, ExecState* callFrame, JSValue exceptionValue) { - if (Options::breakOnThrow()) { - CodeBlock* codeBlock = callFrame->codeBlock(); - if (codeBlock) - dataLog("In call frame ", RawPointer(callFrame), " for code block ", *codeBlock, "\n"); - else - dataLog("In call frame ", RawPointer(callFrame), " with null CodeBlock\n"); - CRASH(); - } - - Exception* exception = vm->exception(); - RELEASE_ASSERT(exception); - HandlerInfo* handler = vm->interpreter->unwind(*vm, callFrame, exception, unwindStart); // This may update callFrame. + RELEASE_ASSERT(exceptionValue); + HandlerInfo* handler = vm->interpreter->unwind(callFrame, exceptionValue); // This may update callFrame. void* catchRoutine; Instruction* catchPCForInterpreter = 0; if (handler) { - // handler->target is meaningless for getting a code offset when catching - // the exception in a DFG/FTL frame. This bytecode target offset could be - // something that's in an inlined frame, which means an array access - // with this bytecode offset in the machine frame is utterly meaningless - // and can cause an overflow. OSR exit properly exits to handler->target - // in the proper frame. - if (!JITCode::isOptimizingJIT(callFrame->codeBlock()->jitType())) - catchPCForInterpreter = &callFrame->codeBlock()->instructions()[handler->target]; + catchPCForInterpreter = &callFrame->codeBlock()->instructions()[handler->target]; #if ENABLE(JIT) catchRoutine = handler->nativeCode.executableAddress(); #else catchRoutine = catchPCForInterpreter->u.pointer; #endif } else - catchRoutine = LLInt::getCodePtr(handleUncaughtException); + catchRoutine = LLInt::getCodePtr(returnFromJavaScript); - vm->callFrameForCatch = callFrame; + vm->callFrameForThrow = callFrame; vm->targetMachinePCForThrow = catchRoutine; vm->targetInterpreterPCForThrow = catchPCForInterpreter; -- cgit v1.2.1