RESOLVED WORKSFORME 163285
[REGRESSION] IDBObjectStore.get returns null for non-existent object rather than undefined
https://bugs.webkit.org/show_bug.cgi?id=163285
Summary [REGRESSION] IDBObjectStore.get returns null for non-existent object rather t...
Yingle
Reported 2016-10-11 09:08:19 PDT
According to https://w3c.github.io/IndexedDB/#dom-idbobjectstore-get, IDBObjectStore.get should return undefined as result. In Safari 10, null is being returned instead and seems to be a regression.
Attachments
Test case that does *not* show the bug (692 bytes, text/html)
2016-10-14 14:42 PDT, Brady Eidson
no flags
Yingle
Comment 1 2016-10-11 10:48:40 PDT
This breaks existing web app that assumes undefined will be returned when the object does not exist in the object store. null is a defined value for object.
Radar WebKit Bug Importer
Comment 2 2016-10-11 17:48:50 PDT
Brady Eidson
Comment 3 2016-10-14 14:24:39 PDT
This is yet another one where I'm shocked there's no relevant w3c test
Chris Dumez
Comment 4 2016-10-14 14:27:30 PDT
(In reply to comment #3) > This is yet another one where I'm shocked there's no relevant w3c test We only pass 80% of those IDB w3c tests last I checked.
Brady Eidson
Comment 5 2016-10-14 14:36:50 PDT
(In reply to comment #4) > (In reply to comment #3) > > This is yet another one where I'm shocked there's no relevant w3c test > > We only pass 80% of those IDB w3c tests last I checked. There's tons of tests (I'm guessing ~20%) targeting IDB 2.0 features. When you subtract out things we don't support, we should pass the suite.
Brady Eidson
Comment 6 2016-10-14 14:37:23 PDT
Regardless, I can't reproduce the bug reported here. Attaching the test case I'm using that shows we correctly return undefined instead of null.
Brady Eidson
Comment 7 2016-10-14 14:42:25 PDT
Created attachment 291668 [details] Test case that does *not* show the bug
Brady Eidson
Comment 8 2016-10-14 14:43:02 PDT
Please attach a test case that actually shows the bug. We can't fix what we can't verify is broken.
Yingle
Comment 9 2016-10-15 12:07:37 PDT
Figured out the reason I got a null is because of another IndexedDB regression https://bugs.webkit.org/show_bug.cgi?id=162554. Also, I verified the problem has been fixed in Safari Technology Preview. Sorry for confusion!
Brady Eidson
Comment 10 2016-10-16 17:23:26 PDT
(In reply to comment #9) > Figured out the reason I got a null is because of another IndexedDB > regression https://bugs.webkit.org/show_bug.cgi?id=162554. Also, I verified > the problem has been fixed in Safari Technology Preview. > Sorry for confusion! Aha! Wasn't even an IndexedDB regression, but definitely affected IDB users! Glad we have an explanation. I'll close the radar, too.
Note You need to log in before you can comment on or make changes to this bug.