summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/heap/HeapTimer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/heap/HeapTimer.cpp')
-rw-r--r--Source/JavaScriptCore/heap/HeapTimer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/JavaScriptCore/heap/HeapTimer.cpp b/Source/JavaScriptCore/heap/HeapTimer.cpp
index fa979781e..214f86757 100644
--- a/Source/JavaScriptCore/heap/HeapTimer.cpp
+++ b/Source/JavaScriptCore/heap/HeapTimer.cpp
@@ -29,7 +29,8 @@
#include "APIShims.h"
#include "JSObject.h"
#include "JSString.h"
-#include "ScopeChain.h"
+
+#include <wtf/MainThread.h>
#include <wtf/Threading.h>
namespace JSC {
@@ -104,6 +105,9 @@ HeapTimer::HeapTimer(JSGlobalData* globalData)
: m_globalData(globalData)
, m_timer(this, &HeapTimer::timerDidFire)
{
+ // FIXME: Implement HeapTimer for other threads.
+ if (WTF::isMainThread() && !m_timer.tryCreateClient())
+ CRASH();
}
HeapTimer::~HeapTimer()