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

Handle Shared-Storage-Write as a single batchUpdate(); Respect withLo… #205

Merged
merged 5 commits into from
Nov 11, 2024

Conversation

xyaoinum
Copy link
Collaborator

@xyaoinum xyaoinum commented Oct 31, 2024

…ck for inner methods within batchUpdate()

Two revisions to our initial proposal:

  1. For Shared-Storage-Write, our initial proposal included individual methods like set(), append(), delete(), and clear(), alongside a batchUpdate() method requiring a serialized string for its methods parameter. To make things simpler, we revise the proposal to treat everything as a single batchUpdate(). It's backward compatible.

  2. Our initial proposal ignored the withLock option for individual methods within a batchUpdate() operation. This approach lacked flexibility and could lead to unintended behavior, as developers might assume the lock should still be acquired. We've revised the proposal to respect the withLock option for each individual method within the batch.

…ck for inner methods within batchUpdate()

Two revisions to our initial proposal:

1. Our initial proposal included individual methods like set(), append(), delete(), and clear(), alongside a batchUpdate() method requiring a serialized string for its `methods` parameter. To make things simpler, we revise the proposal to treat everything as a single batchUpdate().

2. Our initial proposal ignored the `withLock` option for individual methods within a batchUpdate() operation. This approach lacked flexibility and could lead to unintended behavior, as developers might assume the lock should still be acquired. We've revised the proposal to respect the `withLock` option for each individual method within the batch.
@xyaoinum
Copy link
Collaborator Author

@pythagoraskitty / @jkarlin : PTAL. Thanks!

@pythagoraskitty
Copy link
Collaborator

Should there be any updates to the examples section for response headers?

Otherwise I think it is looking good % my question above. I will take another pass if you make more changes. :)

@xyaoinum
Copy link
Collaborator Author

xyaoinum commented Nov 5, 2024

Should there be any updates to the examples section for response headers?

Updated to using batchUpdate() (although the original example should also be valid, as a batchUpdate() without locks should be equivalent to executing individual methods in sequence). I also included two examples within the From response headers section.

Copy link
Collaborator

@jkarlin jkarlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm w/ comment

README.md Show resolved Hide resolved
@xyaoinum xyaoinum merged commit 44ecf99 into main Nov 11, 2024
1 check passed
@xyaoinum xyaoinum deleted the yao-update-web-locks-header branch November 14, 2024 17:43
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 25, 2024
…d SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
aarongable pushed a commit to chromium/chromium that referenced this pull request Nov 25, 2024
…d SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020796
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1387751}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 25, 2024
…d SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020796
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1387751}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 25, 2024
…d SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020796
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1387751}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 26, 2024
… headers

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add the parameter parsing logic in the network service, and send the
  final request to the browser process's central
  SharedStorageLockManager component.
- Since SharedStorageLockManager::SharedStorageUpdate() hides the
  exact database result, we update observer's OnMethodFinished()'s
  parameters accordingly. In the test observer, the error message is
  further transformed into a boolean 'success' result. This callback
  is only used in tests and it's not important to assert the detailed
  result anyway.
- A new test, `SharedStorageHeaderObserverTest.Append_NoCapacity`,
  has been added to demonstrate the case where `SharedStorageUpdate`
  encounters an error.

Bug: 373899210
Change-Id: I4588c83174d465e7248cc1f41c9b7a693aa326f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6042601
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1388298}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 26, 2024
… headers

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add the parameter parsing logic in the network service, and send the
  final request to the browser process's central
  SharedStorageLockManager component.
- Since SharedStorageLockManager::SharedStorageUpdate() hides the
  exact database result, we update observer's OnMethodFinished()'s
  parameters accordingly. In the test observer, the error message is
  further transformed into a boolean 'success' result. This callback
  is only used in tests and it's not important to assert the detailed
  result anyway.
- A new test, `SharedStorageHeaderObserverTest.Append_NoCapacity`,
  has been added to demonstrate the case where `SharedStorageUpdate`
  encounters an error.

Bug: 373899210
Change-Id: I4588c83174d465e7248cc1f41c9b7a693aa326f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6042601
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1388298}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 28, 2024
…odifier options for Window and SharedStorageWorklet, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement 'with_lock' modifier options for Window and SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020796
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1387751}

--

wpt-commits: 7e168195e3629f88bef6293c18ae8674f90893fd
wpt-pr: 49359
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 28, 2024
…ion for methods from response headers, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement with_lock option for methods from response headers

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add the parameter parsing logic in the network service, and send the
  final request to the browser process's central
  SharedStorageLockManager component.
- Since SharedStorageLockManager::SharedStorageUpdate() hides the
  exact database result, we update observer's OnMethodFinished()'s
  parameters accordingly. In the test observer, the error message is
  further transformed into a boolean 'success' result. This callback
  is only used in tests and it's not important to assert the detailed
  result anyway.
- A new test, `SharedStorageHeaderObserverTest.Append_NoCapacity`,
  has been added to demonstrate the case where `SharedStorageUpdate`
  encounters an error.

Bug: 373899210
Change-Id: I4588c83174d465e7248cc1f41c9b7a693aa326f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6042601
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1388298}

--

wpt-commits: 7658fedd9f51c501150e3b70705e48e81887a095
wpt-pr: 49376
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Nov 30, 2024
…odifier options for Window and SharedStorageWorklet, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement 'with_lock' modifier options for Window and SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020796
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1387751}

--

wpt-commits: 7e168195e3629f88bef6293c18ae8674f90893fd
wpt-pr: 49359
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Nov 30, 2024
…ion for methods from response headers, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement with_lock option for methods from response headers

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add the parameter parsing logic in the network service, and send the
  final request to the browser process's central
  SharedStorageLockManager component.
- Since SharedStorageLockManager::SharedStorageUpdate() hides the
  exact database result, we update observer's OnMethodFinished()'s
  parameters accordingly. In the test observer, the error message is
  further transformed into a boolean 'success' result. This callback
  is only used in tests and it's not important to assert the detailed
  result anyway.
- A new test, `SharedStorageHeaderObserverTest.Append_NoCapacity`,
  has been added to demonstrate the case where `SharedStorageUpdate`
  encounters an error.

Bug: 373899210
Change-Id: I4588c83174d465e7248cc1f41c9b7a693aa326f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6042601
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1388298}

--

wpt-commits: 7658fedd9f51c501150e3b70705e48e81887a095
wpt-pr: 49376
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Dec 1, 2024
…odifier options for Window and SharedStorageWorklet, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement 'with_lock' modifier options for Window and SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020796
Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Cr-Commit-Position: refs/heads/main{#1387751}

--

wpt-commits: 7e168195e3629f88bef6293c18ae8674f90893fd
wpt-pr: 49359

UltraBlame original commit: 452dfd2d01858996047826957a14f49748455f2f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Dec 1, 2024
…ion for methods from response headers, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement with_lock option for methods from response headers

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add the parameter parsing logic in the network service, and send the
  final request to the browser process's central
  SharedStorageLockManager component.
- Since SharedStorageLockManager::SharedStorageUpdate() hides the
  exact database result, we update observer's OnMethodFinished()'s
  parameters accordingly. In the test observer, the error message is
  further transformed into a boolean 'success' result. This callback
  is only used in tests and it's not important to assert the detailed
  result anyway.
- A new test, `SharedStorageHeaderObserverTest.Append_NoCapacity`,
  has been added to demonstrate the case where `SharedStorageUpdate`
  encounters an error.

Bug: 373899210
Change-Id: I4588c83174d465e7248cc1f41c9b7a693aa326f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6042601
Reviewed-by: Gary Kacmarcik <garykacchromium.org>
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
Reviewed-by: Kenichi Ishibashi <bashichromium.org>
Reviewed-by: Hidehiko Abe <hidehikochromium.org>
Reviewed-by: Joe Mason <joenotcharlesgoogle.com>
Reviewed-by: Rakina Zata Amni <rakinachromium.org>
Cr-Commit-Position: refs/heads/main{#1388298}

--

wpt-commits: 7658fedd9f51c501150e3b70705e48e81887a095
wpt-pr: 49376

UltraBlame original commit: 880a4df5d51660e9cb2d441528e85800b42a9315
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Dec 1, 2024
…odifier options for Window and SharedStorageWorklet, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement 'with_lock' modifier options for Window and SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020796
Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Cr-Commit-Position: refs/heads/main{#1387751}

--

wpt-commits: 7e168195e3629f88bef6293c18ae8674f90893fd
wpt-pr: 49359

UltraBlame original commit: 452dfd2d01858996047826957a14f49748455f2f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Dec 1, 2024
…ion for methods from response headers, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement with_lock option for methods from response headers

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add the parameter parsing logic in the network service, and send the
  final request to the browser process's central
  SharedStorageLockManager component.
- Since SharedStorageLockManager::SharedStorageUpdate() hides the
  exact database result, we update observer's OnMethodFinished()'s
  parameters accordingly. In the test observer, the error message is
  further transformed into a boolean 'success' result. This callback
  is only used in tests and it's not important to assert the detailed
  result anyway.
- A new test, `SharedStorageHeaderObserverTest.Append_NoCapacity`,
  has been added to demonstrate the case where `SharedStorageUpdate`
  encounters an error.

Bug: 373899210
Change-Id: I4588c83174d465e7248cc1f41c9b7a693aa326f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6042601
Reviewed-by: Gary Kacmarcik <garykacchromium.org>
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
Reviewed-by: Kenichi Ishibashi <bashichromium.org>
Reviewed-by: Hidehiko Abe <hidehikochromium.org>
Reviewed-by: Joe Mason <joenotcharlesgoogle.com>
Reviewed-by: Rakina Zata Amni <rakinachromium.org>
Cr-Commit-Position: refs/heads/main{#1388298}

--

wpt-commits: 7658fedd9f51c501150e3b70705e48e81887a095
wpt-pr: 49376

UltraBlame original commit: 880a4df5d51660e9cb2d441528e85800b42a9315
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 3, 2024
Implement the constructor for `SharedStorageSetMethod`, etc. The
error handling logic mirrors the existing sharedStorage.set(), etc.
To allow code reuse, the sharedStorage.set(), etc. methods
now creates the object and early return on exceptions.

Note that even though we no longer explicitly call resolver->Reject()
for sharedStorage.set(), etc., Chrome still converts thrown
exceptions to rejected promises (to adhere to the specification [1]),
so the end result is the same.

This prepares for the implementation of the
`sharedStorage.batchUpdate(methods)` method, as part of the Web Lock
integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

[1] https://w3ctag.github.io/promises-guide/#always-return-promises

Bug: 373899210
Change-Id: Ie4edfedbe755afeb3db5ca557fd74482bac96138
aarongable pushed a commit to chromium/chromium that referenced this pull request Dec 3, 2024
Implement the constructor for `SharedStorageSetMethod`, etc. The
error handling logic mirrors the existing sharedStorage.set(), etc.
To allow code reuse, the sharedStorage.set(), etc. methods
now creates the object and early return on exceptions.

Note that even though we no longer explicitly call resolver->Reject()
for sharedStorage.set(), etc., Chrome still converts thrown
exceptions to rejected promises (to adhere to the specification [1]),
so the end result is the same.

This prepares for the implementation of the
`sharedStorage.batchUpdate(methods)` method, as part of the Web Lock
integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

[1] https://w3ctag.github.io/promises-guide/#always-return-promises

Bug: 373899210
Change-Id: Ie4edfedbe755afeb3db5ca557fd74482bac96138
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6054694
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1390779}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 3, 2024
Implement the constructor for `SharedStorageSetMethod`, etc. The
error handling logic mirrors the existing sharedStorage.set(), etc.
To allow code reuse, the sharedStorage.set(), etc. methods
now creates the object and early return on exceptions.

Note that even though we no longer explicitly call resolver->Reject()
for sharedStorage.set(), etc., Chrome still converts thrown
exceptions to rejected promises (to adhere to the specification [1]),
so the end result is the same.

This prepares for the implementation of the
`sharedStorage.batchUpdate(methods)` method, as part of the Web Lock
integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

[1] https://w3ctag.github.io/promises-guide/#always-return-promises

Bug: 373899210
Change-Id: Ie4edfedbe755afeb3db5ca557fd74482bac96138
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6054694
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1390779}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 3, 2024
Implement the constructor for `SharedStorageSetMethod`, etc. The
error handling logic mirrors the existing sharedStorage.set(), etc.
To allow code reuse, the sharedStorage.set(), etc. methods
now creates the object and early return on exceptions.

Note that even though we no longer explicitly call resolver->Reject()
for sharedStorage.set(), etc., Chrome still converts thrown
exceptions to rejected promises (to adhere to the specification [1]),
so the end result is the same.

This prepares for the implementation of the
`sharedStorage.batchUpdate(methods)` method, as part of the Web Lock
integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

[1] https://w3ctag.github.io/promises-guide/#always-return-promises

Bug: 373899210
Change-Id: Ie4edfedbe755afeb3db5ca557fd74482bac96138
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6054694
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1390779}
aarongable pushed a commit to chromium/chromium that referenced this pull request Dec 4, 2024
…orklet

Implement the constructor for `SharedStorageSetMethod`, etc in PA
worklet. The error handling logic mirrors the existing
sharedStorage.set(), etc.

Drive-by: fix an ordering issue between IDL error and permissions
policy error. The IDL error should be reported first.

This prepares for the implementation of the
`sharedStorage.batchUpdate(methods)` method, as part of the Web Lock
integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I42563d7e5c2b6d705b015579b72f7254e2dfa11f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6060413
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1391782}
aarongable pushed a commit to chromium/chromium that referenced this pull request Dec 4, 2024
Introduce a new `SharedStorageModifierMethod` IDL interface that is
inherited by individual methods.

This prepares for a follow-up change to add the
`batchUpdate(methods)` API, as part of the Web Locks integration
proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: Id6e21c87c4c58bc2cadd1afb28e528243e800e72
Fuchsia-Binary-Size: Size increase is unavoidable.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6069826
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1391791}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 4, 2024
…Worklet context

This allows developers to perform multiple Shared Storage operations
atomically within a single lock, as part of the Web Lock integration
proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add `batchUpdate(methods, options)` to the `SharedStorage` interface.
- Hooks up the `batchUpdate()` method to the
  `SharedStorageLockManager::SharedStorageBatchUpdate()` API in the
  browser process.

Bug: 373899210
Fuchsia-Binary-Size: Size increase is unavoidable.
Change-Id: I0e1b355e3b3d28518396ae4333afe21e6d02e858
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 4, 2024
…Worklet context

This allows developers to perform multiple Shared Storage operations
atomically within a single lock, as part of the Web Lock integration
proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add `batchUpdate(methods, options)` to the `SharedStorage` interface.
- Hooks up the `batchUpdate()` method to the
  `SharedStorageLockManager::SharedStorageBatchUpdate()` API in the
  browser process.

Bug: 373899210
Fuchsia-Binary-Size: Size increase is unavoidable.
Change-Id: I0e1b355e3b3d28518396ae4333afe21e6d02e858
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6069087
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1391933}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 5, 2024
…Worklet context

This allows developers to perform multiple Shared Storage operations
atomically within a single lock, as part of the Web Lock integration
proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add `batchUpdate(methods, options)` to the `SharedStorage` interface.
- Hooks up the `batchUpdate()` method to the
  `SharedStorageLockManager::SharedStorageBatchUpdate()` API in the
  browser process.

Bug: 373899210
Fuchsia-Binary-Size: Size increase is unavoidable.
Change-Id: I0e1b355e3b3d28518396ae4333afe21e6d02e858
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6069087
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1391933}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Dec 5, 2024
…pend/Delete/Clear IDL Interface, a=testonly

Automatic update from web-platform-tests
[shared storage] Add SharedStorageSet/Append/Delete/Clear IDL Interface

Implement the constructor for `SharedStorageSetMethod`, etc. The
error handling logic mirrors the existing sharedStorage.set(), etc.
To allow code reuse, the sharedStorage.set(), etc. methods
now creates the object and early return on exceptions.

Note that even though we no longer explicitly call resolver->Reject()
for sharedStorage.set(), etc., Chrome still converts thrown
exceptions to rejected promises (to adhere to the specification [1]),
so the end result is the same.

This prepares for the implementation of the
`sharedStorage.batchUpdate(methods)` method, as part of the Web Lock
integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

[1] https://w3ctag.github.io/promises-guide/#always-return-promises

Bug: 373899210
Change-Id: Ie4edfedbe755afeb3db5ca557fd74482bac96138
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6054694
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1390779}

--

wpt-commits: 6a83407ba15135836db19928b90a225bf74eaa1d
wpt-pr: 49486
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Dec 6, 2024
…pend/Delete/Clear IDL Interface, a=testonly

Automatic update from web-platform-tests
[shared storage] Add SharedStorageSet/Append/Delete/Clear IDL Interface

Implement the constructor for `SharedStorageSetMethod`, etc. The
error handling logic mirrors the existing sharedStorage.set(), etc.
To allow code reuse, the sharedStorage.set(), etc. methods
now creates the object and early return on exceptions.

Note that even though we no longer explicitly call resolver->Reject()
for sharedStorage.set(), etc., Chrome still converts thrown
exceptions to rejected promises (to adhere to the specification [1]),
so the end result is the same.

This prepares for the implementation of the
`sharedStorage.batchUpdate(methods)` method, as part of the Web Lock
integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

[1] https://w3ctag.github.io/promises-guide/#always-return-promises

Bug: 373899210
Change-Id: Ie4edfedbe755afeb3db5ca557fd74482bac96138
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6054694
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1390779}

--

wpt-commits: 6a83407ba15135836db19928b90a225bf74eaa1d
wpt-pr: 49486
aarongable pushed a commit to chromium/chromium that referenced this pull request Dec 9, 2024
…rklet

Introduce `SharedStorageModifierMethod` interface to PA worklet, that
is inherited by individual methods.

This is the proposed hierarchy, as part of the Web Locks integration
proposal (e.g., This allows the IDL parameter to be written as
sequence<SharedStorageModifierMethod>, and also allows the Blink class
to store mojom object in the base class):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I2c83574bf9b87ab7c0cb9e6e4c656e742415b49f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072666
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Commit-Queue: Cammie Smith Barnes <cammie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1393929}
jmajnert pushed a commit to jmajnert/chromium that referenced this pull request Dec 10, 2024
…rklet

Introduce `SharedStorageModifierMethod` interface to PA worklet, that
is inherited by individual methods.

This is the proposed hierarchy, as part of the Web Locks integration
proposal (e.g., This allows the IDL parameter to be written as
sequence<SharedStorageModifierMethod>, and also allows the Blink class
to store mojom object in the base class):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I2c83574bf9b87ab7c0cb9e6e4c656e742415b49f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072666
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Commit-Queue: Cammie Smith Barnes <cammie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1393929}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Dec 10, 2024
… for Window and SharedStorageWorklet context, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement batchUpdate() for Window and SharedStorageWorklet context

This allows developers to perform multiple Shared Storage operations
atomically within a single lock, as part of the Web Lock integration
proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add `batchUpdate(methods, options)` to the `SharedStorage` interface.
- Hooks up the `batchUpdate()` method to the
  `SharedStorageLockManager::SharedStorageBatchUpdate()` API in the
  browser process.

Bug: 373899210
Fuchsia-Binary-Size: Size increase is unavoidable.
Change-Id: I0e1b355e3b3d28518396ae4333afe21e6d02e858
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6069087
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1391933}

--

wpt-commits: d54d933593b96018172d332ece95dcec9839a059
wpt-pr: 49533
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Dec 12, 2024
… for Window and SharedStorageWorklet context, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement batchUpdate() for Window and SharedStorageWorklet context

This allows developers to perform multiple Shared Storage operations
atomically within a single lock, as part of the Web Lock integration
proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add `batchUpdate(methods, options)` to the `SharedStorage` interface.
- Hooks up the `batchUpdate()` method to the
  `SharedStorageLockManager::SharedStorageBatchUpdate()` API in the
  browser process.

Bug: 373899210
Fuchsia-Binary-Size: Size increase is unavoidable.
Change-Id: I0e1b355e3b3d28518396ae4333afe21e6d02e858
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6069087
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1391933}

--

wpt-commits: d54d933593b96018172d332ece95dcec9839a059
wpt-pr: 49533
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Dec 13, 2024
…pend/Delete/Clear IDL Interface, a=testonly

Automatic update from web-platform-tests
[shared storage] Add SharedStorageSet/Append/Delete/Clear IDL Interface

Implement the constructor for `SharedStorageSetMethod`, etc. The
error handling logic mirrors the existing sharedStorage.set(), etc.
To allow code reuse, the sharedStorage.set(), etc. methods
now creates the object and early return on exceptions.

Note that even though we no longer explicitly call resolver->Reject()
for sharedStorage.set(), etc., Chrome still converts thrown
exceptions to rejected promises (to adhere to the specification [1]),
so the end result is the same.

This prepares for the implementation of the
`sharedStorage.batchUpdate(methods)` method, as part of the Web Lock
integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

[1] https://w3ctag.github.io/promises-guide/#always-return-promises

Bug: 373899210
Change-Id: Ie4edfedbe755afeb3db5ca557fd74482bac96138
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6054694
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
Cr-Commit-Position: refs/heads/main{#1390779}

--

wpt-commits: 6a83407ba15135836db19928b90a225bf74eaa1d
wpt-pr: 49486

UltraBlame original commit: 74a0444ed16ec0d2ce28a726317fdf8b3b7e8338
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Dec 13, 2024
… for Window and SharedStorageWorklet context, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement batchUpdate() for Window and SharedStorageWorklet context

This allows developers to perform multiple Shared Storage operations
atomically within a single lock, as part of the Web Lock integration
proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add `batchUpdate(methods, options)` to the `SharedStorage` interface.
- Hooks up the `batchUpdate()` method to the
  `SharedStorageLockManager::SharedStorageBatchUpdate()` API in the
  browser process.

Bug: 373899210
Fuchsia-Binary-Size: Size increase is unavoidable.
Change-Id: I0e1b355e3b3d28518396ae4333afe21e6d02e858
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6069087
Reviewed-by: Ayu Ishii <ayuichromium.org>
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Cr-Commit-Position: refs/heads/main{#1391933}

--

wpt-commits: d54d933593b96018172d332ece95dcec9839a059
wpt-pr: 49533

UltraBlame original commit: 6c2624a1e4d570d1bc51c4e3323a0f575f6b51a2
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Dec 13, 2024
…pend/Delete/Clear IDL Interface, a=testonly

Automatic update from web-platform-tests
[shared storage] Add SharedStorageSet/Append/Delete/Clear IDL Interface

Implement the constructor for `SharedStorageSetMethod`, etc. The
error handling logic mirrors the existing sharedStorage.set(), etc.
To allow code reuse, the sharedStorage.set(), etc. methods
now creates the object and early return on exceptions.

Note that even though we no longer explicitly call resolver->Reject()
for sharedStorage.set(), etc., Chrome still converts thrown
exceptions to rejected promises (to adhere to the specification [1]),
so the end result is the same.

This prepares for the implementation of the
`sharedStorage.batchUpdate(methods)` method, as part of the Web Lock
integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

[1] https://w3ctag.github.io/promises-guide/#always-return-promises

Bug: 373899210
Change-Id: Ie4edfedbe755afeb3db5ca557fd74482bac96138
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6054694
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
Cr-Commit-Position: refs/heads/main{#1390779}

--

wpt-commits: 6a83407ba15135836db19928b90a225bf74eaa1d
wpt-pr: 49486

UltraBlame original commit: 74a0444ed16ec0d2ce28a726317fdf8b3b7e8338
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Dec 13, 2024
… for Window and SharedStorageWorklet context, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement batchUpdate() for Window and SharedStorageWorklet context

This allows developers to perform multiple Shared Storage operations
atomically within a single lock, as part of the Web Lock integration
proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add `batchUpdate(methods, options)` to the `SharedStorage` interface.
- Hooks up the `batchUpdate()` method to the
  `SharedStorageLockManager::SharedStorageBatchUpdate()` API in the
  browser process.

Bug: 373899210
Fuchsia-Binary-Size: Size increase is unavoidable.
Change-Id: I0e1b355e3b3d28518396ae4333afe21e6d02e858
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6069087
Reviewed-by: Ayu Ishii <ayuichromium.org>
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Cr-Commit-Position: refs/heads/main{#1391933}

--

wpt-commits: d54d933593b96018172d332ece95dcec9839a059
wpt-pr: 49533

UltraBlame original commit: 6c2624a1e4d570d1bc51c4e3323a0f575f6b51a2
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Dec 13, 2024
…pend/Delete/Clear IDL Interface, a=testonly

Automatic update from web-platform-tests
[shared storage] Add SharedStorageSet/Append/Delete/Clear IDL Interface

Implement the constructor for `SharedStorageSetMethod`, etc. The
error handling logic mirrors the existing sharedStorage.set(), etc.
To allow code reuse, the sharedStorage.set(), etc. methods
now creates the object and early return on exceptions.

Note that even though we no longer explicitly call resolver->Reject()
for sharedStorage.set(), etc., Chrome still converts thrown
exceptions to rejected promises (to adhere to the specification [1]),
so the end result is the same.

This prepares for the implementation of the
`sharedStorage.batchUpdate(methods)` method, as part of the Web Lock
integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

[1] https://w3ctag.github.io/promises-guide/#always-return-promises

Bug: 373899210
Change-Id: Ie4edfedbe755afeb3db5ca557fd74482bac96138
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6054694
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
Cr-Commit-Position: refs/heads/main{#1390779}

--

wpt-commits: 6a83407ba15135836db19928b90a225bf74eaa1d
wpt-pr: 49486

UltraBlame original commit: 74a0444ed16ec0d2ce28a726317fdf8b3b7e8338
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Dec 13, 2024
… for Window and SharedStorageWorklet context, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement batchUpdate() for Window and SharedStorageWorklet context

This allows developers to perform multiple Shared Storage operations
atomically within a single lock, as part of the Web Lock integration
proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add `batchUpdate(methods, options)` to the `SharedStorage` interface.
- Hooks up the `batchUpdate()` method to the
  `SharedStorageLockManager::SharedStorageBatchUpdate()` API in the
  browser process.

Bug: 373899210
Fuchsia-Binary-Size: Size increase is unavoidable.
Change-Id: I0e1b355e3b3d28518396ae4333afe21e6d02e858
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6069087
Reviewed-by: Ayu Ishii <ayuichromium.org>
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Cr-Commit-Position: refs/heads/main{#1391933}

--

wpt-commits: d54d933593b96018172d332ece95dcec9839a059
wpt-pr: 49533

UltraBlame original commit: 6c2624a1e4d570d1bc51c4e3323a0f575f6b51a2
xyaoinum added a commit that referenced this pull request Dec 17, 2024
This is part of the Web Locks integration proposal: #199, #205

This patch:
- Introduces the modifier methods' constructors.
- Introduces the batchUpdate() method.
- Switch to call batchUpdate() for the response header.

Support for with_lock options will be included in the next patch.
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 18, 2024
…header

Parse "options;with_lock=xxx" into the `with_lock` parameter. If
multiple "options" Items appear in the List, the last one will be
used. The parsed value is passed to the browser process's
`BatchUpdate()` API in the lock manager.

This allows developers to perform multiple Shared Storage operations
atomically within a single lock, as part of the Web Lock integration
proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: Id041e92075b22988656a3db4f1a74792312ee422
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 18, 2024
…header

Parse "options;with_lock=xxx" into the `with_lock` parameter. If
multiple "options" Items appear in the List, the last one will be
used. The parsed value is passed to the browser process's
`BatchUpdate()` API in the lock manager.

This allows developers to perform multiple Shared Storage operations
atomically within a single lock, as part of the Web Lock integration
proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: Id041e92075b22988656a3db4f1a74792312ee422
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072742
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1397664}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 18, 2024
…header

Parse "options;with_lock=xxx" into the `with_lock` parameter. If
multiple "options" Items appear in the List, the last one will be
used. The parsed value is passed to the browser process's
`BatchUpdate()` API in the lock manager.

This allows developers to perform multiple Shared Storage operations
atomically within a single lock, as part of the Web Lock integration
proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: Id041e92075b22988656a3db4f1a74792312ee422
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072742
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1397664}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants