commit | 347092291b208b8e4e1d70ca0079931817c94736 | [log] [tgz] |
---|---|---|
author | Hiroki Nakagawa <nhiroki@chromium.org> | Mon Mar 19 09:16:46 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Mar 19 09:16:46 2018 |
tree | 9208de9319b94add3ef6eb0ee7abfeef34062f02 | |
parent | ec6e21b6e5159fee87fc595a225e9d3abd7a9a53 [diff] |
Worker: Make sure to post messages after dedicated worker script evaluation This is a preparation CL for module scripts on workers. Before this CL, postMessage() requests during dedicated worker startup are queued until a worker thread is created and a thread initialization task is posted to the worker thread. This works for classic scripts because classic script evaluation happens synchronously after thread initialization and there is no timing to interleave the message tasks. However, this is not applicable for module scripts because module script evaluation happens asynchronously on the worker thread. This allows posted tasks run before script evaluation and results in dropouts of the Message events. This CL makes sure to post message tasks after script evaluation. ObjectProxy on the worker thread notifies MessagingProxy on the main thread of the completion of script evaluation, and then MessagingProxy posts queued messages. Bug: 680046 Change-Id: I7cb32cc8911a7bbe9e5d83e5f7fceb333bb3125a Reviewed-on: https://chromium-review.googlesource.com/967914 Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Matt Falkenhagen <falken@chromium.org> Reviewed-by: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#543996}
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 .