WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 136155
indexeddb versionchange event not fired
https://bugs.webkit.org/show_bug.cgi?id=136155
Summary
indexeddb versionchange event not fired
Jake Archibald
Reported
2014-08-22 06:20:32 PDT
Visit
http://jsbin.com/velolu/1/quiet
Open
http://jsbin.com/pucegu/1/quiet
in another tab First tab should have versionchange event (compare to Firefox & Chrome). Also getting some weird "unknownerror"s if I run this test a few times.
Attachments
Add attachment
proposed patch, testcase, etc.
Raymond Camden
Comment 1
2014-09-26 07:20:17 PDT
I can confirm this is a bug, but I want to add a bit of context. The bug is that if you have 2 tabs open using the same DB, and the second tab has upgraded the db, the first tab is not getting the event. If, however, you use one tab, load the page, edit the code to change the version, and reload the page, the event is fired properly. So this is more an issue of someone using the same DB concurrently. Probably a bit more rare, but should still be fixed.
Radar WebKit Bug Importer
Comment 2
2015-04-25 14:51:47 PDT
<
rdar://problem/20699757
>
Brady Eidson
Comment 3
2016-03-21 21:33:34 PDT
This works great in Modern IDB: Confirmed in the latest WebKit Nightly (
r198511
)
Nolan Lawson
Comment 4
2016-03-30 10:40:16 PDT
I'm still able to reproduce the bug in WebKit Nightly
r198834
- is that because I'm on Yosemite? In the second tab, I don't see "Upgrading from version 1 / Connected to DB - you win!" Instead I just see "Database closed - go back to the other tab.", indicating the versionchange event wasn't fired. I reproduced the correct behavior in both Chrome 49 and Firefox 47 for comparison. I also tested several times with different origins between each test.
Brady Eidson
Comment 5
2016-03-30 10:59:30 PDT
(In reply to
comment #4
)
> I'm still able to reproduce the bug in WebKit Nightly
r198834
- is that > because I'm on Yosemite?
Nope - In fact Yosemite definitely wouldn't have the nightly issues that El Cap has been having.
> In the second tab, I don't see "Upgrading from version 1 / Connected to DB - > you win!" Instead I just see "Database closed - go back to the other tab.", > indicating the versionchange event wasn't fired. > > I reproduced the correct behavior in both Chrome 49 and Firefox 47 for > comparison. I also tested several times with different origins between each > test.
Can you "remove all website data" then try again? Or, more directly, with Safari/Nightly *not* running, do: `rm -rf ~/Library/Safari/Databases/___IndexedDB/` ...then try again. I can reproduce the correct behavior in a nightly at-will.
Nolan Lawson
Comment 6
2016-03-30 11:05:31 PDT
I actually downloaded Jake's examples and ran them on localhost on multiple ports, so there ought to be no need to clear data. I tried five times and still couldn't reproduce the correct behavior. I'm downloading El Cap and will try again...
Brady Eidson
Comment 7
2016-03-30 11:16:52 PDT
(In reply to
comment #6
)
> I actually downloaded Jake's examples and ran them on localhost on multiple > ports, so there ought to be no need to clear data. I tried five times and > still couldn't reproduce the correct behavior. > > I'm downloading El Cap and will try again...
There's no expected reason why this would be a Yosemite vs El Cap difference. One other (stretch) thought - You're not trying in private browsing mode, are you?
Nolan Lawson
Comment 8
2016-03-30 11:37:11 PDT
Nope, I wasn't in private browsing. After upgrading to El Cap, I can confirm working in both WebKit Nightly
r198834
and Safari Technology Preview 9.1.1 (11601.6.10, 11602.1.25). Not sure why it wasn't working in Yosemite (or if that was even my issue), but nice work! :)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug