Open Bug 1833153 Opened 1 year ago Updated 4 months ago

storage.sync should not emit onChanged events for calls that are not resulting into changes to the store data

Categories

(WebExtensions :: Storage, defect, P3)

defect

Tracking

(Not tracked)

ASSIGNED

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.
Assignee: nobody → lgreco
Status: NEW → ASSIGNED

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.

Flags: needinfo?(tomica)
Flags: needinfo?(lgreco)

This issue came up in the WECG, at https://github.com/w3c/webextensions/issues/511

Whiteboard: [addons-jira] → [addons-jira][wecg]

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.

See Also: → 1621162
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: