Created attachment 261088 [details] Reproducible test case (May be a dup of https://bugs.webkit.org/show_bug.cgi?id=60720, but it was marked as invalid because they didn't have a good reproducible test case.) In WebKit Nightly 600.8.9 (as well as Safari 8.0.8), it is possible to put() two documents with the same key, even if that key is defined as a unique index. I have a reproducible test case to demonstrate: http://bl.ocks.org/nolanlawson/28ff2db3f3cb386c8ecb. The same test is also attached to this bug. If the bug has been successfully reproduced, then this HTML page will print "There is a bug." Note that openKeyCursor() also returns the same key twice. This bug cannot be reproduced in either Firefox or Chrome.
+1 for this bug. Reproducable.
Good thing this is fixed in Modern IDB! Works great in ToT/WebKit nightly.
Will Safari9 in OSX 10.11 get this update?
(In reply to comment #3) > Will Safari9 in OSX 10.11 get this update? This is the WebKit open source project. Safari is an Apple product, and Apple generally does not comment on their future products.
Generally !== always, huh? :) Not in this Safari version, right?
(In reply to comment #5) > Generally !== always, huh? :) > Not in this Safari version, right? I'm not sure what you're trying to clarify. This should be working for you in whatever relatively modern Safari version you have + a WebKit nightly.
Okay, thank you
Nice to see progress getting made on this! :) Unfortunately I tested my demo site (http://bl.ocks.org/nolanlawson/28ff2db3f3cb386c8ecb) on WebKit Nightly (10601.5.17.1.1, r195011) and it seems to still be broken. (It says "there is a bug.") Was this closed too early or is there some other reason the test case is failing?
(In reply to comment #8) > Was this closed too early or is there some other reason the test > case is failing? Unclear. I see the same with the attached test case (but did not on 3/4) I'll poke around using the attached test case.
Odd. I reproduced this in the latest WebKit nightly, but it works fine in my local build of ToT.
(In reply to comment #10) > Odd. > > I reproduced this in the latest WebKit nightly, but it works fine in my > local build of ToT. Nope, bonehead - I did *not* reproduce with a WebKit nightly. I was using stock Safari. So, to clarify - I cannot reproduce this being broken. In nightly 198484 (r198484.dmg">http://builds.nightly.webkit.org/files/trunk/mac/WebKit-SVN-r198484.dmg) and a ToT debug build, the attached test case works fine. ---- If you see the text There is a bug, then there's a bug. Got a ConstraintError when we tried to put() the same key twice Found keys: a Found primaryKeys: 1
(In reply to comment #8) Oh I see: > Unfortunately I tested my demo site > (http://bl.ocks.org/nolanlawson/28ff2db3f3cb386c8ecb) on WebKit Nightly > (10601.5.17.1.1, r195011) and it seems to still be broken. (It says "there > is a bug.") Was this closed too early or is there some other reason the test > case is failing? Nightly 195011 is ancient. January 14th was well before the new engine was enabled in WebKit2, which is what Safari (and therefore WebKit nightlies) uses. Try with the latest nightly, please.
(In reply to comment #12) > (In reply to comment #8) > > Oh I see: > > > Unfortunately I tested my demo site > > (http://bl.ocks.org/nolanlawson/28ff2db3f3cb386c8ecb) on WebKit Nightly > > (10601.5.17.1.1, r195011) and it seems to still be broken. (It says "there > > is a bug.") Was this closed too early or is there some other reason the test > > case is failing? > > Nightly 195011 is ancient. > > January 14th was well before the new engine was enabled in WebKit2, which is > what Safari (and therefore WebKit nightlies) uses. > > Try with the latest nightly, please. For the historical record: Modern IDB wasn't enabled in WK2 until http://trac.webkit.org/changeset/197122, and there were still some pretty bad bugs with it for another ~1 week after that.
My bad! It is indeed fixed. Somehow I got stuck with an old version of WebKit Nightly, but re-downloading worked. :) I'm on r198490. Also a big thank-you for your work on "modern IDB"! Love seeing all these IDB bugs slowly getting knocked down.