ASSERTION FAILED: m_scriptExecutionContext->isContextThread() seen with LayoutTest...
authorjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 May 2017 19:27:09 +0000 (19:27 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 May 2017 19:27:09 +0000 (19:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=171462
<rdar://problem/31906859>

Reviewed by Brent Fulgham.

Covered by existing tests.

* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::~WorkerGlobalScope):
Clear Crypto early in destruction since its ContextDestructionObserver
destruction makes checks about the WorkerThread.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216133 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/workers/WorkerGlobalScope.cpp

index 967f110..fbd942a 100644 (file)
@@ -1,3 +1,18 @@
+2017-05-03  Jiewen Tan  <jiewen_tan@apple.com>
+
+        ASSERTION FAILED: m_scriptExecutionContext->isContextThread() seen with LayoutTest crypto/workers/crypto-random-values-limits-worker.html
+        https://bugs.webkit.org/show_bug.cgi?id=171462
+        <rdar://problem/31906859>
+
+        Reviewed by Brent Fulgham.
+
+        Covered by existing tests.
+
+        * workers/WorkerGlobalScope.cpp:
+        (WebCore::WorkerGlobalScope::~WorkerGlobalScope):
+        Clear Crypto early in destruction since its ContextDestructionObserver
+        destruction makes checks about the WorkerThread.
+
 2017-05-03  Zalan Bujtas  <zalan@apple.com>
 
         RenderSearchField should not use isTextField() in SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT
index 5d1af83..df3531b 100644 (file)
@@ -101,6 +101,8 @@ WorkerGlobalScope::~WorkerGlobalScope()
     m_performance = nullptr;
 #endif
 
+    m_crypto = nullptr;
+
     // Notify proxy that we are going away. This can free the WorkerThread object, so do not access it after this.
     thread().workerReportingProxy().workerGlobalScopeDestroyed();
 }