Commit f8eb2756 authored by haraken's avatar haraken Committed by Commit bot

Clear WorkerGlobalScope::m_thread in WorkerGlobalScope::dispose()

WorkerGlobalScope::m_thread was intentionally not cleared due to destruction ordering issues in Oilpan (*),
but I think the issue had existed only in the transition period.
This CL adds code to clear WorkerGlobalScope::m_thread in WorkerGlobalScope::dispose().

(*) https://chromium.googlesource.com/chromium/src/+/58f0cf11c7e11bc0dcdd09c08912625b89ba97bb

BUG=

Review-Url: https://codereview.chromium.org/2024033002
Cr-Commit-Position: refs/heads/master@{#398254}
parent 0f15eb5e
......@@ -210,16 +210,7 @@ void WorkerGlobalScope::dispose()
clearScript();
clearInspector();
m_eventQueue->close();
// We do not clear the thread field of the
// WorkerGlobalScope. Other objects keep the worker global scope
// alive because they need its thread field to check that work is
// being carried out on the right thread. We therefore cannot clear
// the thread field before all references to the worker global
// scope are gone.
//
// TODO(haraken): It's nasty to keep a raw pointer to WorkerThread
// after disposing WorkerGlobalScope. m_thread should be cleared here.
m_thread = nullptr;
}
void WorkerGlobalScope::didEvaluateWorkerScript()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment