summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/JavaScriptCore/runtime
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@nokia.com>2009-08-03 17:40:43 (GMT)
committerTor Arne Vestbø <tor.arne.vestbo@nokia.com>2009-08-03 18:18:03 (GMT)
commitea1b369a3c90f26523d68d089f76f4cb96308d56 (patch)
tree73a153d40a6660d38e39a6ba719572de7e2a736d /src/3rdparty/webkit/JavaScriptCore/runtime
parente520df1f8678bd59adb341fb586f008a7de17fe8 (diff)
downloadQt-ea1b369a3c90f26523d68d089f76f4cb96308d56.zip
Qt-ea1b369a3c90f26523d68d089f76f4cb96308d56.tar.gz
Qt-ea1b369a3c90f26523d68d089f76f4cb96308d56.tar.bz2
Make JSC::TimeoutChecker subclassable and replacable in the global data
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSONObject.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp4
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h1
5 files changed, 9 insertions, 2 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp
index ff728e8..95b4d0c 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp
@@ -134,6 +134,7 @@ JSGlobalData::JSGlobalData(bool isShared, const VPtrSet& vptrSet)
#if ENABLE(JIT)
, jitStubs(this)
#endif
+ , timeoutChecker(new TimeoutChecker)
, heap(this)
, initializingLazyNumericCompareFunction(false)
, head(0)
@@ -176,6 +177,7 @@ JSGlobalData::~JSGlobalData()
delete parser;
delete lexer;
+ delete timeoutChecker;
deleteAllValues(opaqueJSClassData);
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h
index d5202c6..dca3e94 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h
@@ -124,7 +124,7 @@ namespace JSC {
#if ENABLE(JIT)
JITThunks jitStubs;
#endif
- TimeoutChecker timeoutChecker;
+ TimeoutChecker* timeoutChecker;
Heap heap;
JSValue exception;
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSONObject.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSONObject.cpp
index 2f02b1d..bbbe3af 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSONObject.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSONObject.cpp
@@ -394,7 +394,7 @@ Stringifier::StringifyResult Stringifier::appendStringifiedValue(StringBuilder&
return StringifySucceeded;
// If this is the outermost call, then loop to handle everything on the holder stack.
- TimeoutChecker localTimeoutChecker(m_exec->globalData().timeoutChecker);
+ TimeoutChecker localTimeoutChecker(*m_exec->globalData().timeoutChecker);
localTimeoutChecker.reset();
unsigned tickCount = localTimeoutChecker.ticksUntilNextCheck();
do {
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp
index 30ba6e9..49839db 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp
@@ -108,6 +108,10 @@ TimeoutChecker::TimeoutChecker()
reset();
}
+TimeoutChecker::~TimeoutChecker()
+{
+}
+
void TimeoutChecker::reset()
{
m_ticksUntilNextCheck = ticksUntilFirstCheck;
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h b/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h
index 7bfa6d0..5ef1542 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h
@@ -38,6 +38,7 @@ namespace JSC {
class TimeoutChecker {
public:
TimeoutChecker();
+ virtual ~TimeoutChecker();
void setTimeoutInterval(unsigned timeoutInterval) { m_timeoutInterval = timeoutInterval; }