Chromium Code Reviews
DescriptionMessaging: Avoid calling non-thread-safe functions in MessagePort::messageAvailable()
As implementation comments in MessagePort::messageAvailable(), it can be called
from another thread and should not call non-thread-functions. However, the
current implementation wrongly calls ContextLifecycleObserver's
GetExecutionContext() that is not a thread-safe function to post a task to the
context thread.
To avoid that, this CL replaces ExecutionContext::PostTask() with
WebTaskRunner::PostTask(). The task runner is captured in the ctor of
MessagePort called on the context thread.
BUG=694925
Review-Url: https://codereview.chromium.org/2818073002
Cr-Commit-Position: refs/heads/master@{#465886}
Committed: https://chromium.googlesource.com/chromium/src/+/829907ac0d3d2ed39d8752d22a6d0e45df1e8325
Patch Set 1 #Patch Set 2 : rebase #
Messages
Total messages: 18 (10 generated)
|
|||||||||||||||||||||||||||||||||||||