Bug 203103

Summary: DatabaseContext should not prevent entering the back/forward cache
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, commit-queue, ggaren, ryanhaddad, sihui_liu, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=206291
Bug Depends on:    
Bug Blocks: 202293    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Chris Dumez 2019-10-17 09:56:10 PDT
DatabaseContext should not prevent entering the back/forward cache.
Comment 1 Radar WebKit Bug Importer 2019-10-24 13:34:20 PDT
<rdar://problem/56592193>
Comment 2 Chris Dumez 2019-10-24 13:35:56 PDT
*** Bug 159379 has been marked as a duplicate of this bug. ***
Comment 3 Chris Dumez 2019-10-24 13:36:07 PDT
Created attachment 381841 [details]
Patch
Comment 4 Geoffrey Garen 2019-10-24 21:28:49 PDT
Comment on attachment 381841 [details]
Patch

r=me
Comment 5 WebKit Commit Bot 2019-10-24 22:36:09 PDT
The commit-queue encountered the following flaky tests while processing attachment 381841 [details]:

The commit-queue is continuing to process your patch.
Comment 6 WebKit Commit Bot 2019-10-24 22:36:26 PDT
The commit-queue encountered the following flaky tests while processing attachment 381841 [details]:

imported/w3c/web-platform-tests/svg/text/visualtests/text-inline-size-003-visual.svg bug 203172 (author: sabouhallawa@apple.com)
fast/history/page-cache-webdatabase-pending-transaction.html bug 203399 (author: cdumez@apple.com)
The commit-queue is continuing to process your patch.
Comment 7 WebKit Commit Bot 2019-10-25 01:14:31 PDT
Comment on attachment 381841 [details]
Patch

Clearing flags on attachment: 381841

Committed r251586: <https://trac.webkit.org/changeset/251586>
Comment 8 WebKit Commit Bot 2019-10-25 01:14:33 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Chris Dumez 2019-10-25 08:44:26 PDT
Reverted r251586 for reason:

New test is flaky

Committed r251592: <https://trac.webkit.org/changeset/251592>
Comment 10 Chris Dumez 2019-10-25 09:11:41 PDT
Looks like queueing JS callbacks in not sufficient because Database threads currently get terminated on navigation and may therefore not have time to schedule their callbacks:
1   0x7243d44e1 WTF::MessageQueue<WebCore::DatabaseTask>::kill()
2   0x7243d0ac4 WebCore::DatabaseThread::requestTermination(WebCore::DatabaseTaskSynchronizer*)
3   0x7243d0988 WebCore::DatabaseContext::stopDatabases(WebCore::DatabaseTaskSynchronizer*)
4   0x7243d2be3 WebCore::DatabaseManager::stopDatabases(WebCore::Document&, WebCore::DatabaseTaskSynchronizer*)
5   0x7256d2e39 WebCore::FrameLoader::stopLoading(WebCore::UnloadEventPolicy)
Comment 11 Chris Dumez 2019-10-27 16:34:58 PDT
Created attachment 382042 [details]
Patch
Comment 12 Chris Dumez 2019-10-28 12:33:58 PDT
Created attachment 382095 [details]
Patch
Comment 13 Chris Dumez 2019-10-30 15:50:37 PDT
ping review?
Comment 14 Chris Dumez 2019-11-04 12:53:47 PST
ping review?
Comment 15 Geoffrey Garen 2019-11-05 10:46:05 PST
Comment on attachment 382095 [details]
Patch

r=me

Pretty sure WebDatabase is fully disabled these days, so I guess this is an example of why it would be good to remove the code entirely soon.
Comment 16 WebKit Commit Bot 2019-11-05 11:15:25 PST
Comment on attachment 382095 [details]
Patch

Clearing flags on attachment: 382095

Committed r252064: <https://trac.webkit.org/changeset/252064>
Comment 17 WebKit Commit Bot 2019-11-05 11:15:27 PST
All reviewed patches have been landed.  Closing bug.