From cec1d9c704143f110b6045af2b087690a0af81a9 Mon Sep 17 00:00:00 2001 From: "jiewen_tan@apple.com" Date: Wed, 3 May 2017 19:27:09 +0000 Subject: [PATCH] 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 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 | 15 +++++++++++++++ Source/WebCore/workers/WorkerGlobalScope.cpp | 2 ++ 2 files changed, 17 insertions(+) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 967f110..fbd942a 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,18 @@ +2017-05-03 Jiewen Tan + + 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 + + + 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 RenderSearchField should not use isTextField() in SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT diff --git a/Source/WebCore/workers/WorkerGlobalScope.cpp b/Source/WebCore/workers/WorkerGlobalScope.cpp index 5d1af83..df3531b 100644 --- a/Source/WebCore/workers/WorkerGlobalScope.cpp +++ b/Source/WebCore/workers/WorkerGlobalScope.cpp @@ -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(); } -- 1.8.3.1