storage.sync should not emit onChanged events for calls that are not resulting into changes to the store data
Categories
(WebExtensions :: Storage, defect, P3)
Tracking
(Not tracked)
People
(Reporter: rpl, Assigned: rpl, NeedInfo)
References
Details
(Whiteboard: [addons-jira][wecg])
Attachments
(1 file)
We noticed this inconsistency while we have been working on introducing storage.session API (Bug 1823713).
As for the storage.local API we wouldn't be checking if the value as been changed or not (because that would require to detect changes in potentially deeply nested values) but we should still not emit the onChanged event if there was no keys to be changed or removed in the storage API call, e.g.
- removing a key that isn't part of the stored keys (or was removed before)
- clearing an already empty store
- calling set with an empty object.
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
Depends on D173839
Updated•1 year ago
|
Comment 2•1 year ago
|
||
There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:rpl, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.
Comment 3•9 months ago
|
||
This issue came up in the WECG, at https://github.com/w3c/webextensions/issues/511
Comment 4•9 months ago
|
||
Unless I'm missing something, Bug 1621162 has declared this behaviour is intentional and even landed docs for it in https://github.com/mdn/content/pull/18326/files.
Comment 5•9 months ago
|
||
(the rust component has a test specifically for this case)
Description
•