NativeIO: Plumbing and minimal functionality. #22212
Merged
Conversation
The review process for this patch is being conducted in the Chromium project. |
6310943
to
98a7be9
cfe38f7
to
c92d228
This is a scaffolding CL for NativeIO, a.k.a. Low-Level Storage. Most details will probably change over time, but the overall architecture is intended to be stable. To facilitate review, this CL aims to introduce enough aspects of the API for readers to reason about IPC security and general architectural concerns in the browser and in Blink. The summary below is also intended to facilitate review. * NativeIO introduces new per-origin storage. The per-origin model matches other existing storage APIs, so no new permissions are added. * NativeIO storage is structured as files in a flat per-origin namespace. Files are stored in a per-origin directory under the user's profile. * The browser-side implementation enforces access control at the file level. Once a renderer is allowed to open a file, the browser passes the file descriptor to the renderer. This approach aims to minimize the latency of I/O operations. * The renderer exposes two API flavors to web pages -- an asynchronous version and a synchronous version. The latter is only available in dedicated workers. The goal is to allow developers to experiment with both flavors of the API, and report back on performance and stability. * In the asynchronous API, all file I/O is done on tasks posted to Blink's worker thread pool. This avoids jank on the main thread, at the cost of two thread hops per I/O operation. This CL adds two READMEs with some minimal information. * //third_party/blink/renderer/modules/native_io/README.md * //third_party/blink/web_tests/external/wpt/native-io/README.md An API explainer is available at https://github.com/fivedots/nativeio-explainer Binary-Size: New Web Platform feature. Fugu P1. Bug: 914488 Change-Id: I2c8c794837c5332d81bfbab2ed0827e1f26f7cf4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2093918 Commit-Queue: Victor Costan <pwnall@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Reviewed-by: Marijn Kruisselbrink <mek@chromium.org> Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org> Reviewed-by: Mike West <mkwst@chromium.org> Cr-Commit-Position: refs/heads/master@{#753327}
c92d228
to
2d74c14
48f8659
into
master
13 checks passed
13 checks passed
Azure Pipelines (affected tests without changes: Safari Technology Preview)
affected tests without changes: Safari Technology Preview succeeded
Details
Azure Pipelines (affected tests: Safari Technology Preview)
affected tests: Safari Technology Preview succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests)
wpt.fyi hook: safari-preview-affected-tests succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests-without-changes)
wpt.fyi hook: safari-preview-affected-tests-without-changes succeeded
Details
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
This is a scaffolding CL for NativeIO, a.k.a. Low-Level Storage. Most
details will probably change over time, but the overall architecture is
intended to be stable. To facilitate review, this CL aims to introduce
enough aspects of the API for readers to reason about IPC security and
general architectural concerns in the browser and in Blink.
The summary below is also intended to facilitate review.
matches other existing storage APIs, so no new permissions are added.
namespace. Files are stored in a per-origin directory under the user's
profile.
level. Once a renderer is allowed to open a file, the browser passes
the file descriptor to the renderer. This approach aims to minimize
the latency of I/O operations.
version and a synchronous version. The latter is only available in
dedicated workers. The goal is to allow developers to experiment with
both flavors of the API, and report back on performance and stability.
Blink's worker thread pool. This avoids jank on the main thread, at
the cost of two thread hops per I/O operation.
This CL adds two READMEs with some minimal information.
An API explainer is available at
https://github.com/fivedots/nativeio-explainer
Binary-Size: New Web Platform feature. Fugu P1.
Bug: 914488
Change-Id: I2c8c794837c5332d81bfbab2ed0827e1f26f7cf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2093918
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753327}