DescriptionFix MessagePort race exposed by blink scheduler
Because render thread IPCs don't currently go through the Blink Scheduler,
it's possible for the order of execution between blink tasks and IPC tasks
to change. Most of the time this is harmless, but it exposes a race
condition between the MessagePort::dispatchMessages task posted by
MessagePort::start and WebMessagePortChannelImpl::OnMessage. Normally
the initial dispatchMessages would execute first and do nothing, but if
OnMessage gets in first then a message will delivered even if the channel
has been closed.
This patch fixes that by adding a check in dispatchMessages to see if the
channel has been closed.
BUG=432129
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185237
Patch Set 1 #Patch Set 2 : Adding a couple of layout tests to lock in the behavior #Patch Set 3 : Adding the tests too :) #
Total comments: 3
Patch Set 4 : Fix test descriptions which had got mixed up. #
Messages
Total messages: 12 (4 generated)
|