Bug 204864

Summary: IPC messages may get processed out of order in some cases
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, ap, beidson, commit-queue, ggaren, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Chris Dumez 2019-12-04 16:53:52 PST
IPC messages may get processed out of order in some cases. Connection::SyncMessageState::dispatchMessages() puts messages it did not process back at the end of the queue, instead of the beginning. This means that messages added to the queue while Connection::SyncMessageState::dispatchMessages() was running will incorrectly run *before* the ones dispatchMessages() did not process.
Comment 1 Chris Dumez 2019-12-04 16:56:02 PST
Created attachment 384864 [details]
Patch
Comment 2 Alexey Proskuryakov 2019-12-04 18:12:28 PST
Is this related to bug 141122?
Comment 3 Chris Dumez 2019-12-04 18:17:21 PST
(In reply to Alexey Proskuryakov from comment #2)
> Is this related to bug 141122?

I will check if it helps, I have not checked. I just happened to be looking at this code today for perf reasons and noticed the logic was wrong.
Comment 4 WebKit Commit Bot 2019-12-04 20:13:25 PST
Comment on attachment 384864 [details]
Patch

Clearing flags on attachment: 384864

Committed r253138: <https://trac.webkit.org/changeset/253138>
Comment 5 WebKit Commit Bot 2019-12-04 20:13:27 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-12-04 20:14:19 PST
<rdar://problem/57651997>