Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NativeIO: Plumbing and minimal functionality. #22212

Merged
merged 1 commit into from Mar 25, 2020

Conversation

@chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Mar 12, 2020

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}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2093918 branch 9 times, most recently from 6310943 to 98a7be9 Mar 16, 2020
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2093918 branch 2 times, most recently from cfe38f7 to c92d228 Mar 24, 2020
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}
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2093918 branch from c92d228 to 2d74c14 Mar 25, 2020
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 48f8659 into master Mar 25, 2020
13 checks passed
13 checks passed
Azure Pipelines Build #20200325.66 succeeded
Details
Azure Pipelines (./wpt test-jobs) ./wpt test-jobs succeeded
Details
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
Community-TC (pull_request) TaskGroup: success
Details
staging.wpt.fyi - chrome[experimental] Chrome results
Details
staging.wpt.fyi - firefox[experimental] Firefox results
Details
staging.wpt.fyi - safari[experimental] Safari results
Details
wpt.fyi - chrome[experimental] Chrome results
Details
wpt.fyi - firefox[experimental] Firefox results
Details
wpt.fyi - safari[experimental] Safari results
Details
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-2093918 branch Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.