From bb6aee6989aadfa1bcf4b36f302540440b3acc93 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 9 Sep 2009 10:37:57 +0200 Subject: Fix crash in QtScript with exceptions. When trying to determine if there is a handler for an exception, determine the returnPC for the call frame traversal frmo the corrent CallFrame object. Reviewed-by: Kent Hansen --- src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp index 3af4a29..c538eb1 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp @@ -586,13 +586,14 @@ NEVER_INLINE HandlerInfo* Interpreter::throwException(CallFrame*& callFrame, JSV unsigned bytecodeOffsetTemp = bytecodeOffset; CodeBlock *codeBlockTemp = codeBlock; while (!(handler = codeBlockTemp->handlerForBytecodeOffset(bytecodeOffsetTemp))) { + void* returnPC = callFrameTemp->returnPC(); callFrameTemp = callFrameTemp->callerFrame(); if (callFrameTemp->hasHostCallFrameFlag()) { hasHandler = false; break; } else { codeBlockTemp = callFrameTemp->codeBlock(); - bytecodeOffsetTemp = bytecodeOffsetForPC(callFrameTemp, codeBlockTemp, callFrameTemp->returnPC()); + bytecodeOffsetTemp = bytecodeOffsetForPC(callFrameTemp, codeBlockTemp, returnPC); } } if (debugger) -- cgit v0.12