Bug 142052 - Drop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContainingThisFrame()
Summary: Drop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePa...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
Keywords: InRadar
Depends on:
Reported: 2015-02-26 12:09 PST by Chris Dumez
Modified: 2015-02-27 11:22 PST (History)
4 users (show)

See Also:

Patch (10.54 KB, patch)
2015-02-26 13:10 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (10.60 KB, patch)
2015-02-27 11:21 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 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.
Comment 1 Chris Dumez 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.
Comment 2 Chris Dumez 2015-02-26 13:10:37 PST
Created attachment 247439 [details]
Comment 3 Chris Dumez 2015-02-27 09:42:37 PST
Radar: <rdar://problem/19923085>
Comment 4 Andreas Kling 2015-02-27 11:13:22 PST
Comment on attachment 247439 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=247439&action=review


> 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.

Comment 5 WebKit Commit Bot 2015-02-27 11:15:46 PST
Comment on attachment 247439 [details]

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
Comment 6 Chris Dumez 2015-02-27 11:21:10 PST
Created attachment 247525 [details]
Comment 7 Chris Dumez 2015-02-27 11:22:27 PST
Comment on attachment 247525 [details]

Clearing flags on attachment: 247525

Committed r180770: <http://trac.webkit.org/changeset/180770>
Comment 8 Chris Dumez 2015-02-27 11:22:31 PST
All reviewed patches have been landed.  Closing bug.