commit | b8e24bdbf6bbe43bc32fd684f2a0aad914e804d2 | [log] [tgz] |
---|---|---|
author | Istiaque Ahmed <lazyboy@chromium.org> | Thu Sep 13 15:17:25 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Sep 13 15:17:25 2018 |
tree | 63a6812cb725aee6d61c06c1d6b2359be949968f | |
parent | 68b565c011b512bb112c6374f75fdbb30defa8cc [diff] |
[Extensions SW] Fix Event registration race. There's no ordering guarantee between SW mojo IPCs and extension IPCs. This (infrequently) causes browser process to see event listener registration *after* the browser process decides to dispatch that event. This CL adds extension IPCs to notify browser process when: - A service worker context has finished loading and executing its global JS scope's code (this corresponds to EmbeddedWorkerInstance::OnStarted) - A service worker context has destroyed. With these IPCs, browser process can identify which extenison SWs are running at a given point, and ServiceWorkerTaskQueue can queue up tasks to dispatch events when a worker hasn't completely started, e.g. when the worker has started from SW mojo IPC's perspective, but it hasn't yet finished executing its global JS code from legacy IPC's perspective. Bug: 879015 Test: EventsToStoppedWorker test doesn't flake locally anymore. Change-Id: I390e102a55acb97d680265d3362d7e01d72aea1b Reviewed-on: https://chromium-review.googlesource.com/1203319 Commit-Queue: Istiaque Ahmed <lazyboy@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Devlin <rdevlin.cronin@chromium.org> Reviewed-by: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#591014}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .