-
Notifications
You must be signed in to change notification settings - Fork 12
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
Property updating should be atomic #8
Comments
I'm not sure that we have any use case for changing any property after construction. Unless we get a concrete request for that capability, I'd suggest that all properties should be set at construction time and immutable after that. |
Sounds reasonable, thank you! |
This change does the following - Make all PendingBeacon's property readonly per [discussion][1] - Replace `state` with `isPending` - Update links to explainer doc. [1]: WICG/pending-beacon#8 Bug: 1293679 Change-Id: I4fbcee7b436cc9ed22775433b00f5d85ead9d9e2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3743630 Reviewed-by: Yutaka Hirano <[email protected]> Commit-Queue: Ming-Ying Chung <[email protected]> Reviewed-by: Rakina Zata Amni <[email protected]> Reviewed-by: Matthew Denton <[email protected]> Cr-Commit-Position: refs/heads/main@{#1021516}
I don't think it's to far fetched to want to update query args on the URL, for systems that still rely on query args instead of HTTP body. Additionally, I'm not convinced that we'd need an atomic operation to update multiple properties (I would expect the failures you mention in the case above, and not expect the browser to mitigate that). |
We have several properties (
url
,method
, ...) which can be updated independently. This is not good from two reasons.Let's think about (2) as it's simpler.
A page may crash at any timing, so with the current API the web developer need to deal with four possibilities. This can be pretty confusing, because by nature analyzing crash reports is hard and complex.
While (q) and (r) are rare, all can happen. For multi-process implementations such as Chrome, the possibility grows when the system is busy, because of IPC latency.
We can address this problem by making the modification atomic.
Now we have only two possibilities.
The text was updated successfully, but these errors were encountered: