diff options
Diffstat (limited to 'WebCore/bindings/scripts/test/JS/JSTestCallback.cpp')
-rw-r--r-- | WebCore/bindings/scripts/test/JS/JSTestCallback.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp b/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp index 043a6ed..6f6b568 100644 --- a/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp +++ b/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp @@ -43,7 +43,10 @@ JSTestCallback::JSTestCallback(JSObject* callback, JSDOMGlobalObject* globalObje JSTestCallback::~JSTestCallback() { - m_scriptExecutionContext->postTask(DeleteCallbackDataTask::create(m_data)); + if (m_scriptExecutionContext->isContextThread()) + delete m_data; + else + m_scriptExecutionContext->postTask(DeleteCallbackDataTask::create(m_data)); #ifndef NDEBUG m_data = 0; #endif |