Skip to content
Snippets Groups Projects
Commit f96d9d73 authored by Andrew Sutherland's avatar Andrew Sutherland
Browse files

Bug 1820210 - Worker improvements. r=dom-worker-reviewers,edenchuang a=RyanVM

parent c3d3ff42
No related branches found
No related tags found
No related merge requests found
......@@ -85,6 +85,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());
......@@ -140,6 +142,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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment