Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Intent to Ship: Support transactional batchUpdate() and disallow batch inner locks

214 views
Skip to first unread message

Yao Xiao

unread,
Apr 25, 2025, 4:16:06 PMApr 25
to blink-dev, Cammie Smith Barnes, Josh Karlin, Sara Akram, Kasper Kulikowski
Intent to Ship: Support transactional batchUpdate() and disallow batch inner locks

Contact emails

yao...@chromium.org

cam...@chromium.org

jka...@chromium.org

sara...@google.com

kaskul...@google.com


Explainer

https://github.com/WICG/shared-storage#proposed-api-surface


Specification

https://wicg.github.io/shared-storage/#batch-update


Summary

We are modifying the `sharedStorage.batchUpdate(methods)` API, introduced in the I2S 'Adding Web Locks Support to Shared Storage', to enforce atomicity. This involves treating the entire `batchUpdate()` as a single transaction, rather than executing methods independently. For simplicity, we do not support locks for the individual methods within the batchUpdate, but only on the batchUpdate itself.


Blink component

Blink>Storage>SharedStorage


TAG review

FYI


TAG review status

TAG is unsatisfied with the underlying API


Risks

Compatibility

This change is not backward compatible. Specifically:

  • JavaScript `batchUpdate()` calls specifying inner method locks will now throw an exception.

  • "Shared-Storage-Write" response headers specifying inner method locks will cause the entire operation to be ignored.


Since `batchUpdate()` was recently released, it has not yet been adopted and the Chrome Features Dashboard confirms that this change should not break any sites.


Interoperability

Gecko: No signal

WebKit: No signal

Web developers: No signal

Other signals:


WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

  • None


Security / Privacy

No concerns.


Debuggability

Shared Storage worklets can be inspected within DevTools: Debug Shared Storage worklets with DevTools


We are working on adding the `withLock` parameter and a `batchUpdate()` event to the Application -> Shared Storage panel in DevTools.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

All but WebView


Is this feature fully tested by web-platform-tests?

Yes


Finch feature name

SharedStorageTransactionalBatchUpdate


Requires code in //chrome?

No


Estimated milestones

We intend to ship in M137


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5763021961691136



Chris Harrelson

unread,
Apr 30, 2025, 11:23:41 AMApr 30
to Yao Xiao, blink-dev, Cammie Smith Barnes, Josh Karlin, Sara Akram, Kasper Kulikowski
LGTM1

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/35e180ef-17df-474a-a5e5-7479fd9212b4n%40chromium.org.

Yoav Weiss (@Shopify)

unread,
Apr 30, 2025, 11:24:03 AMApr 30
to blink-dev, Chris Harrelson, blink-dev, Cammie Smith Barnes, Josh Karlin, Sara Akram, Kasper Kulikowski, Yao Xiao
LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Mike Taylor

unread,
Apr 30, 2025, 11:24:59 AMApr 30
to Yoav Weiss (@Shopify), blink-dev, Chris Harrelson, Cammie Smith Barnes, Josh Karlin, Sara Akram, Kasper Kulikowski, Yao Xiao

LGTM3

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/3c412ebd-47c9-48ba-af63-5c9157f3ee91n%40chromium.org.
Reply all
Reply to author
Forward
0 new messages