зеркало из https://github.com/mozilla/gecko-dev.git
bug 1476514 rename WorkletImpl::TerminateThread to NotifyWorkletFinished r=baku
This is more appropriate when WorkletImpl will not necessarily create a thread. Differential Revision: https://phabricator.services.mozilla.com/D13212 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ffd18ba6eb
Коммит
cc08802d30
|
@ -436,7 +436,7 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(Worklet)
|
|||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Worklet)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mWindow)
|
||||
tmp->mImpl->TerminateThread();
|
||||
tmp->mImpl->NotifyWorkletFinished();
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
|
@ -469,7 +469,7 @@ Worklet::Worklet(nsPIDOMWindowInner* aWindow, RefPtr<WorkletImpl> aImpl)
|
|||
|
||||
Worklet::~Worklet()
|
||||
{
|
||||
mImpl->TerminateThread();
|
||||
mImpl->NotifyWorkletFinished();
|
||||
}
|
||||
|
||||
JSObject*
|
||||
|
|
|
@ -92,15 +92,14 @@ WorkletImpl::GetOrCreateThread()
|
|||
}
|
||||
|
||||
void
|
||||
WorkletImpl::TerminateThread()
|
||||
WorkletImpl::NotifyWorkletFinished()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
if (!mWorkletThread) {
|
||||
return;
|
||||
}
|
||||
|
||||
mWorkletThread->Terminate();
|
||||
mWorkletThread = nullptr;
|
||||
if (mWorkletThread) {
|
||||
mWorkletThread->Terminate();
|
||||
mWorkletThread = nullptr;
|
||||
}
|
||||
mWorkletLoadInfo.mPrincipal = nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
JS::Handle<JSObject*> aGivenProto);
|
||||
|
||||
dom::WorkletThread* GetOrCreateThread();
|
||||
void TerminateThread();
|
||||
void NotifyWorkletFinished();
|
||||
|
||||
// Execution thread only.
|
||||
already_AddRefed<dom::WorkletGlobalScope> CreateGlobalScope(JSContext* aCx);
|
||||
|
|
Загрузка…
Ссылка в новой задаче