summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/jit/JITExceptions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/jit/JITExceptions.cpp')
-rw-r--r--Source/JavaScriptCore/jit/JITExceptions.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/Source/JavaScriptCore/jit/JITExceptions.cpp b/Source/JavaScriptCore/jit/JITExceptions.cpp
index 4f6d9e8f0..8084f773b 100644
--- a/Source/JavaScriptCore/jit/JITExceptions.cpp
+++ b/Source/JavaScriptCore/jit/JITExceptions.cpp
@@ -27,6 +27,7 @@
#include "JITExceptions.h"
#include "CallFrame.h"
+#include "CallFrameInlines.h"
#include "CodeBlock.h"
#include "Interpreter.h"
#include "JITStubs.h"
@@ -35,22 +36,15 @@
#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)
+void genericUnwind(VM* vm, ExecState* callFrame, JSValue exceptionValue)
{
- if (Options::breakOnThrow()) {
- dataLog("In call frame ", RawPointer(callFrame), " for code block ", *callFrame->codeBlock(), "\n");
- CRASH();
- }
-
- 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.
+ RELEASE_ASSERT(exceptionValue);
+ HandlerInfo* handler = vm->interpreter->unwind(callFrame, exceptionValue); // This may update callFrame.
void* catchRoutine;
Instruction* catchPCForInterpreter = 0;
@@ -62,9 +56,8 @@ void genericUnwind(VM* vm, ExecState* callFrame)
catchRoutine = catchPCForInterpreter->u.pointer;
#endif
} else
- catchRoutine = LLInt::getCodePtr(handleUncaughtException);
+ catchRoutine = LLInt::getCodePtr(returnFromJavaScript);
- vm->vmEntryFrameForThrow = vmEntryFrame;
vm->callFrameForThrow = callFrame;
vm->targetMachinePCForThrow = catchRoutine;
vm->targetInterpreterPCForThrow = catchPCForInterpreter;