Skip to content

Commit

Permalink
Bug 1318506 - Label MessagePort runnables by DocGroup (r=bkelly)
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: 8uhgm7ivVSh
  • Loading branch information
bill-mccloskey committed Dec 1, 2016
1 parent 6236b35 commit 423185f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dom/messagechannel/MessagePort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,12 @@ MessagePort::Dispatch()

mPostMessageRunnable = new PostMessageRunnable(this, data);

nsCOMPtr<nsIGlobalObject> global = GetOwnerGlobal();
if (NS_IsMainThread() && global) {
MOZ_ALWAYS_SUCCEEDS(global->Dispatch("MessagePortMessage", TaskCategory::Other, do_AddRef(mPostMessageRunnable)));
return;
}

MOZ_ALWAYS_SUCCEEDS(NS_DispatchToCurrentThread(mPostMessageRunnable));
}

Expand Down

0 comments on commit 423185f

Please sign in to comment.