Changeset 260787 in webkit


Ignore:
Timestamp:
Apr 27, 2020 2:48:48 PM (4 years ago)
Author:
Chris Dumez
Message:

[iOS][WK2] Drop "com.apple.WebKit.DatabaseActivity" UIKit background activity
https://bugs.webkit.org/show_bug.cgi?id=211084

Reviewed by Geoffrey Garen.

Drop "com.apple.WebKit.DatabaseActivity" UIKit background activity in the UIProcess now that local storage
has been moved to the network process.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _setUpSQLiteDatabaseTrackerClient]): Deleted.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r260785 r260787  
     12020-04-27  Chris Dumez  <cdumez@apple.com>
     2
     3        [iOS][WK2] Drop "com.apple.WebKit.DatabaseActivity" UIKit background activity
     4        https://bugs.webkit.org/show_bug.cgi?id=211084
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Drop "com.apple.WebKit.DatabaseActivity" UIKit background activity in the UIProcess now that local storage
     9        has been moved to the network process.
     10
     11        * UIProcess/API/Cocoa/WKWebView.mm:
     12        (-[WKWebView _initializeWithConfiguration:]):
     13        (-[WKWebView _setUpSQLiteDatabaseTrackerClient]): Deleted.
     14
    1152020-04-27  Ryan Haddad  <ryanhaddad@apple.com>
    216
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm

    r260764 r260787  
    125125#import <WebCore/RuntimeApplicationChecks.h>
    126126#import <WebCore/RuntimeEnabledFeatures.h>
    127 #import <WebCore/SQLiteDatabaseTracker.h>
    128127#import <WebCore/Settings.h>
    129128#import <WebCore/SharedBuffer.h>
     
    161160#import <MobileCoreServices/MobileCoreServices.h>
    162161#import <UIKit/UIApplication.h>
    163 #import <WebCore/WebBackgroundTaskController.h>
    164 #import <WebCore/WebSQLiteDatabaseTrackerClient.h>
    165162#import <pal/spi/cocoa/QuartzCoreSPI.h>
    166163#import <pal/spi/ios/GraphicsServicesSPI.h>
     
    403400    _inspectorDelegate = makeUnique<WebKit::InspectorDelegate>(self);
    404401
    405     [self _setUpSQLiteDatabaseTrackerClient];
    406 
    407402    for (auto& pair : pageConfiguration->urlSchemeHandlers())
    408403        _page->setURLSchemeHandlerForScheme(WebKit::WebURLSchemeHandlerCocoa::create(static_cast<WebKit::WebURLSchemeHandlerCocoa&>(pair.value.get()).apiHandler()), pair.key);
     
    534529    if (!linkedOnOrAfter(WebKit::SDKVersion::FirstWhereSiteSpecificQuirksAreEnabledByDefault))
    535530        pageConfiguration->preferences()->setNeedsSiteSpecificQuirks(false);
    536 }
    537 
    538 - (void)_setUpSQLiteDatabaseTrackerClient
    539 {
    540 #if PLATFORM(IOS_FAMILY)
    541     WebBackgroundTaskController *controller = [WebBackgroundTaskController sharedController];
    542     if (controller.backgroundTaskStartBlock)
    543         return;
    544 
    545     controller.backgroundTaskStartBlock = ^NSUInteger (void (^expirationHandler)())
    546     {
    547         return [[UIApplication sharedApplication] beginBackgroundTaskWithName:@"com.apple.WebKit.DatabaseActivity" expirationHandler:expirationHandler];
    548     };
    549     controller.backgroundTaskEndBlock = ^(UIBackgroundTaskIdentifier taskIdentifier)
    550     {
    551         [[UIApplication sharedApplication] endBackgroundTask:taskIdentifier];
    552     };
    553     controller.invalidBackgroundTaskIdentifier = UIBackgroundTaskInvalid;
    554 
    555     WebCore::SQLiteDatabaseTracker::setClient(&WebCore::WebSQLiteDatabaseTrackerClient::sharedWebSQLiteDatabaseTrackerClient());
    556 #endif
    557531}
    558532
Note: See TracChangeset for help on using the changeset viewer.