Bug 142076

Summary: Make IDBDatabase / IDBRequest suspendable
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: alecflett, bfulgham, buildbot, commit-queue, jsbell, kling, koivisto, rniwa
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews101 for mac-mavericks
none
Patch
none
Patch none

Description Chris Dumez 2015-02-26 21:36:03 PST
Make IDBDatabase / IDBRequest suspendable under certain conditions to make it more likely for pages using indexeddb to enter the PageCache.

IDBDatabase is safely suspendable if the database is closed. IDBRequest is safely suspendable if the request's state is DONE (i.e. success / failure handler was called). We may be able to do better later but this is the bare minimum.

Radar: <rdar://problem/19923085>
Comment 1 Chris Dumez 2015-02-26 21:52:38 PST
Created attachment 247498 [details]
Patch
Comment 2 Build Bot 2015-02-26 22:24:26 PST
Comment on attachment 247498 [details]
Patch

Attachment 247498 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5952840031797248

New failing tests:
fast/history/page-cache-indexed-closed-db.html
fast/history/page-cache-indexed-opened-db.html
Comment 3 Build Bot 2015-02-26 22:24:31 PST
Created attachment 247501 [details]
Archive of layout-test-results from ews101 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 4 Chris Dumez 2015-02-26 22:35:54 PST
Created attachment 247502 [details]
Patch
Comment 5 Chris Dumez 2015-02-27 10:07:37 PST
Created attachment 247518 [details]
Patch
Comment 6 Andreas Kling 2015-02-27 11:19:02 PST
Comment on attachment 247518 [details]
Patch

r=me
Comment 7 Chris Dumez 2015-02-27 11:24:42 PST
Comment on attachment 247518 [details]
Patch

Clearing flags on attachment: 247518

Committed r180771: <http://trac.webkit.org/changeset/180771>
Comment 8 Chris Dumez 2015-02-27 11:24:47 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Brent Fulgham 2015-02-27 13:23:50 PST
These new tests timeout on Windows:

fast/history/page-cache-indexed-closed-db.html
fast/history/page-cache-indexed-opened-db.html
fast/history/page-cache-webdatabase-opened-db.html
Comment 10 Chris Dumez 2015-02-27 13:24:47 PST
(In reply to comment #9)
> These new tests timeout on Windows:
> 
> fast/history/page-cache-indexed-closed-db.html
> fast/history/page-cache-indexed-opened-db.html
> fast/history/page-cache-webdatabase-opened-db.html

Maybe Windows does not implement IndexedDB?
Comment 11 Chris Dumez 2015-02-27 13:25:49 PST
(In reply to comment #10)
> (In reply to comment #9)
> > These new tests timeout on Windows:
> > 
> > fast/history/page-cache-indexed-closed-db.html
> > fast/history/page-cache-indexed-opened-db.html
> > fast/history/page-cache-webdatabase-opened-db.html
> 
> Maybe Windows does not implement IndexedDB?

Right, they need to be skipped on Windows, similarly to pre-existing:
LayoutTests/platform/win/TestExpectations:storage/indexeddb/ [ Skip ]
Comment 12 Chris Dumez 2015-02-27 13:35:32 PST
Follow up in <http://trac.webkit.org/changeset/180776> to skip the new tests on platforms that don't enable IndexedDB.