chrome.storage.sync.set({'existingKey': undefined}): inconsistency with Firefox
Reported by
vitaly.z...@gmail.com,
Oct 17
|
||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.102 Safari/537.36 Vivaldi/2.0.1309.42
Steps to reproduce the problem:
1. chrome.storage.sync.set({'mykey': true})
2. chrome.storage.sync.set({'mykey': undefined})
3. chrome.storage.sync.get(resp => console.log(resp['mykey']))
What is the expected behavior?
Print undefined
What went wrong?
Print old value - true.
Did this work before? N/A
Does this work in other browsers? Yes
Chrome version: 69.0.3497.102 Channel: n/a
OS Version: OS X 10.14.0
Flash Version:
,
Oct 18
,
Oct 18
Changing this behavior will break many existing extensions, many of which are no longer maintained. Also, Chrome seems to act in a straightforward fashion by adhering to its specified behavior of storing just the JSON-ifiable portion of an object so undefined is not getting written, which is correct, even though it's admittedly confusing at first. OTOH many things in extensions API are confusing at first.
,
Oct 18
You should probably report this to Firefox instead.
,
Oct 18
This is already in Firefox bugtracker with WONTFIX because they think that this is expected behaviour, maybe it is true, I do not know, but we want consistency https://bugzilla.mozilla.org/show_bug.cgi?id=1499842
,
Oct 18
,
Oct 23
|
||||
►
Sign in to add a comment |
||||
Comment 1 by bugsnash@chromium.org
, Oct 17