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 83952
IDB: Pending setVersion call in worker prevents document from opening the db, even after worker termination
https://bugs.webkit.org/show_bug.cgi?id=83952
Summary
IDB: Pending setVersion call in worker prevents document from opening the db,...
David Grogan
Reported
2012-04-13 15:51:08 PDT
Pending setVersion transaction prevents document from opening that db, even after worker termination
Attachments
Patch
(5.71 KB, patch)
2012-04-13 15:51 PDT
,
David Grogan
no flags
Details
Formatted Diff
Diff
Patch
(9.27 KB, patch)
2012-04-17 16:38 PDT
,
David Grogan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
David Grogan
Comment 1
2012-04-13 15:51:30 PDT
Created
attachment 137168
[details]
Patch
David Grogan
Comment 2
2012-04-16 15:02:16 PDT
Josh, Alec, could you take a look at these layout tests before I ask ojan or tony to review? The chrome bug these exercise is
http://code.google.com/p/chromium/issues/detail?id=123418
.
Joshua Bell
Comment 3
2012-04-17 10:36:23 PDT
Comment on
attachment 137168
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=137168&action=review
The logic of the test lgtm
> LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate.html:15 > + request.onsuccess = startTheWorker;
I'd put this assignment in an "else" clause to the if block below, to improve readability.
> LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate.html:28 > + realFinishJSTest = finishJSTest;
Rather than this IMHO fragile hooking into the finishJSTest mechanism, how about adding a new worker script that does a custom postMessage? (At some point we should add a better hook mechanism, e.g. startWorker(script, function myfilter(message) { if (handled) { return true; } })
David Grogan
Comment 4
2012-04-17 16:38:36 PDT
Created
attachment 137633
[details]
Patch
David Grogan
Comment 5
2012-04-17 16:39:48 PDT
Comment on
attachment 137168
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=137168&action=review
>> LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate.html:15 >> + request.onsuccess = startTheWorker; > > I'd put this assignment in an "else" clause to the if block below, to improve readability.
Done.
>> LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate.html:28 >> + realFinishJSTest = finishJSTest; > > Rather than this IMHO fragile hooking into the finishJSTest mechanism, how about adding a new worker script that does a custom postMessage? > > (At some point we should add a better hook mechanism, e.g. startWorker(script, function myfilter(message) { if (handled) { return true; } })
Done. Agreed on the better hook mechanism. My plan was to add a method to the worker object that would let scripts assign handlers to codes.
David Grogan
Comment 6
2012-04-17 16:45:02 PDT
Comment on
attachment 137633
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=137633&action=review
> LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate.html:35 > + originalOnMessage = worker.onmessage;
This is still hacky but less hacky than the old patch. Just this bit of marginal unhackiness was enough to reveal that the tests did not pass in DRT either, so thanks for the suggestion. The unexpectedSuccessCallback from the worker was calling finishJSTest which reloaded the page with "?second", something I thought was being done by the finishJSTest call in the blocked handler.
> LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate.html:38 > + worker.terminate();
This line is the only difference between pending-version-change-stuck.html and pending-version-change-stuck-works-with-terminate.html.
Joshua Bell
Comment 7
2012-04-17 16:48:01 PDT
Comment on
attachment 137633
[details]
Patch lgtm
David Grogan
Comment 8
2012-04-17 19:00:09 PDT
Ojan, could you review this?
WebKit Review Bot
Comment 9
2012-04-18 11:40:47 PDT
Comment on
attachment 137633
[details]
Patch Clearing flags on attachment: 137633 Committed
r114540
: <
http://trac.webkit.org/changeset/114540
>
WebKit Review Bot
Comment 10
2012-04-18 11:40:52 PDT
All reviewed patches have been landed. Closing bug.
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