forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Extension SW] Fix a race in EventAckData
When EventAckData sees an event dispatch in IncrementInflightEvent on UI [1] thread, it hops to IO thread to start the associated worker and then returns to UI[2] to *record* that the event needs an ack from the renderer process. Event ACKs arriving between UI[1] and UI[2] would incorrectly fail to find the associated data in the *record*. This results in bad message termination. Move the data to IO thread instead, where both IncrementInflightEvent and DecrementInflightEvent can access the unacked event data. Note that both IncrementInflightEvent/DecrementInflightEvent has to pass through IO thread anyway to access ServiceWorkerContext. The new inner class IOEventData inside EventAckData contains the map for unacked events. This also fixes and enables an existing test's flakiness: FilteredEventsAfterRestart. Bug: 844821 Change-Id: Ia9df6c896abbae62c9f395f62ef67cab8e1bfb74 Reviewed-on: https://chromium-review.googlesource.com/1228994 Commit-Queue: Istiaque Ahmed <lazyboy@chromium.org> Reviewed-by: Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/master@{#592674}
- Loading branch information
Istiaque Ahmed
authored and
Commit Bot
committed
Sep 20, 2018
1 parent
04ae1fd
commit f571252
Showing
4 changed files
with
89 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters