commit | 46532f347d4a6799647e012df075789b52dac5d9 | [log] [tgz] |
---|---|---|
author | kapishnikov <kapishnikov@chromium.org> | Mon Oct 23 08:54:46 2017 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Oct 23 08:54:46 2017 |
tree | b0fecb5300ffed6b0f2296e433aa67465dc2004e | |
parent | e54fde96ea1c566cce0f4041cd9c283de230f265 [diff] |
Cronet: Disallow blocking I/O on the network thread with exception on init Currently, the Cronet network thread allows blocking I/O. We would like to disable it unless it is the initialization code that has to finish the creation of the prefs service before the thread can be used to send network requests. That includes the creation of the storage directory and files. This change is motivated by M63 blocking issue 770053. It assumes that blocking I/O is disabled right after the thread creation. As the result, disallowing blocking I/O after Cronet initialization doesn't solve the issue. The CL makes use ScopedAllowBlocking class, which use is not public and discouraged. However, it provides the simplest solution to the problem. The alternative solutions either mimic ScopedAllowBlocking with an additional thread or require significant changes to Cronet code, e.g. queuing all network request until the prefs service is initialized. BUG=770053 Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet Change-Id: Ib97b8b727bcfb349050434858332342264e3737d Reviewed-on: https://chromium-review.googlesource.com/705700 Reviewed-by: John Abd-El-Malek <jam@chromium.org> Reviewed-by: Misha Efimov <mef@chromium.org> Commit-Queue: Andrei Kapishnikov <kapishnikov@chromium.org> Cr-Commit-Position: refs/heads/master@{#510740}
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 .