зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1820210 - Worker improvements. r=dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D171779
This commit is contained in:
Родитель
a225e191c6
Коммит
c0b696292a
|
@ -86,6 +86,8 @@ void Worker::PostMessage(JSContext* aCx, JS::Handle<JS::Value> aMessage,
|
|||
if (!mWorkerPrivate || mWorkerPrivate->ParentStatusProtected() > Running) {
|
||||
return;
|
||||
}
|
||||
RefPtr<WorkerPrivate> workerPrivate = mWorkerPrivate;
|
||||
Unused << workerPrivate;
|
||||
|
||||
JS::Rooted<JS::Value> transferable(aCx, JS::UndefinedValue());
|
||||
|
||||
|
@ -145,6 +147,10 @@ void Worker::PostMessage(JSContext* aCx, JS::Handle<JS::Value> aMessage,
|
|||
|
||||
runnable->Write(aCx, aMessage, transferable, clonePolicy, aRv);
|
||||
|
||||
if (!mWorkerPrivate || mWorkerPrivate->ParentStatusProtected() > Running) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isTimelineRecording) {
|
||||
end = MakeUnique<WorkerTimelineMarker>(
|
||||
NS_IsMainThread()
|
||||
|
|
Загрузка…
Ссылка в новой задаче