Bug 142052

Summary: Drop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContainingThisFrame()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Page LoadingAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, commit-queue, kling, koivisto
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Chris Dumez
Reported 2015-02-26 12:09:40 PST
Drop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContainingThisFrame(). DatabaseContext is an ActiveDOMObject and DatabaseContext::canSuspend() returns false if its has open databases already. Therefore, such pages would already not go into the page cache. Another issue is that DatabaseContext::m_hasOpenDatabases is never reset to false. Therefore, any page that ever used the WebDatabase API is currently not page-cacheable. This issue will be addressed separately.
Attachments
Patch (10.54 KB, patch)
2015-02-26 13:10 PST, Chris Dumez
no flags
Patch (10.60 KB, patch)
2015-02-27 11:21 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2015-02-26 12:16:10 PST
Actually, DatabaseContext does not even override ActiveDOMObject::canSuspend() currently no it always returns false and any page with a DatabaseContext is not page-cacheable, no matter if there are open databases or not.
Chris Dumez
Comment 2 2015-02-26 13:10:37 PST
Chris Dumez
Comment 3 2015-02-27 09:42:37 PST
Andreas Kling
Comment 4 2015-02-27 11:13:22 PST
Comment on attachment 247439 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=247439&action=review r=me > Source/WebCore/ChangeLog:18 > + An issue that remains is that DatabaseContext::m_hasOpenDatabases is never reset > + to false so once a page opened a database, it will never be page-cacheable. This > + will be taken care of separately though. Sweet.
WebKit Commit Bot
Comment 5 2015-02-27 11:15:46 PST
Comment on attachment 247439 [details] Patch Rejecting attachment 247439 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 247439, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: file Source/WebCore/page/DiagnosticLoggingKeys.cpp patching file Source/WebCore/page/DiagnosticLoggingKeys.h patching file LayoutTests/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file LayoutTests/fast/history/page-cache-webdatabase-opened-db-expected.txt patching file LayoutTests/fast/history/page-cache-webdatabase-opened-db.html Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Andreas Kling']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: http://webkit-queues.appspot.com/results/5816908611846144
Chris Dumez
Comment 6 2015-02-27 11:21:10 PST
Chris Dumez
Comment 7 2015-02-27 11:22:27 PST
Comment on attachment 247525 [details] Patch Clearing flags on attachment: 247525 Committed r180770: <http://trac.webkit.org/changeset/180770>
Chris Dumez
Comment 8 2015-02-27 11:22:31 PST
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.