New issue
Advanced search Search tips

Issue 896503 link

Starred by 3 users

Issue metadata

Status: Unconfirmed
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

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:
 
Components: Internals>Network>Cookies
Labels: Needs-Triage-M69
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.
You should probably report this to Firefox instead.
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
Components: -Internals>Network>Cookies Platform>Extensions>API
Labels: -Hotlist-Interop

Sign in to add a comment