ASSERTION FAILED: m_normalWorld->hasOneRef() under WorkerThread::stop
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Feb 2017 05:02:32 +0000 (05:02 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Feb 2017 05:02:32 +0000 (05:02 +0000)
commit8b50922ee7ff93fc5f34f55db378ea4346cf76da
tree8bb504368037c4fd634de040e48662efce7c1055
parente17c6787d72a8e417ec11a5a42d12dc3f59e1479
ASSERTION FAILED: m_normalWorld->hasOneRef() under WorkerThread::stop
https://bugs.webkit.org/show_bug.cgi?id=168356
<rdar://problem/30592486>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-02-20
Reviewed by Ryosuke Niwa.

Source/WebCore:

* page/DOMWindow.cpp:
(WebCore::DOMWindow::removeAllEventListeners):
Remove Performance object EventListeners.

* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::~WorkerGlobalScope):
(WebCore::WorkerGlobalScope::removeAllEventListeners):
(WebCore::WorkerGlobalScope::performance):
* workers/WorkerGlobalScope.h:
Remove Performance object EventListeners.
Also clear Performance early in destruction since its ContextDestructionObserver
destruction makes checks about the WorkerThread.

LayoutTests:

* TestExpectations:
Unskip tests now that they no longer trigger assertions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/workers/WorkerGlobalScope.cpp
Source/WebCore/workers/WorkerGlobalScope.h