summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/javascriptcore
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-22 07:23:25 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-22 07:52:12 (GMT)
commit716e0284c8f569d71e42354fd6fc3b965233e019 (patch)
treec97326578bd3afba3433125dc5259a222501a5e4 /src/3rdparty/javascriptcore
parentb92da40d6a921c8518dd39477a9e53df343225c3 (diff)
downloadQt-716e0284c8f569d71e42354fd6fc3b965233e019.zip
Qt-716e0284c8f569d71e42354fd6fc3b965233e019.tar.gz
Qt-716e0284c8f569d71e42354fd6fc3b965233e019.tar.bz2
Fix tst_QScriptEngine::throwErrorFromProcessEvents
The problem is that the interpreter did not check for exception while running the "while(true){}" loop, as it deduced that none of the generated opcode would possibly generate an exception. The solution is to force a check right after we come from a timeout. Reviewed-by: Kent Hansen
Diffstat (limited to 'src/3rdparty/javascriptcore')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp3
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp
index c538eb1..42e0b05 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp
@@ -1182,8 +1182,9 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
goto vm_throw; \
} \
tickCount = globalData->timeoutChecker->ticksUntilNextCheck(); \
+ CHECK_FOR_EXCEPTION(); \
}
-
+
#if ENABLE(OPCODE_SAMPLING)
#define SAMPLE(codeBlock, vPC) m_sampler->sample(codeBlock, vPC)
#else
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
index 0a5eb07..7928593 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
@@ -717,7 +717,7 @@ DEFINE_STUB_FUNCTION(int, timeout_check)
globalData->exception = createInterruptedExecutionException(globalData);
VM_THROW_EXCEPTION_AT_END();
}
-
+ CHECK_FOR_EXCEPTION_AT_END();
return timeoutChecker->ticksUntilNextCheck();
}