Changeset 220501 in webkit


Ignore:
Timestamp:
Aug 9, 2017 6:07:09 PM (7 years ago)
Author:
aestes@apple.com
Message:

Part 3 of: Rename DatabaseProcess to StorageProcess
https://bugs.webkit.org/show_bug.cgi?id=175034

Reviewed by Brady Eidson.

Source/WebKit:

We tried renaming com.apple.WebKit.Databases to com.apple.WebKit.Storage in r219986, but
this prevented trunk WebKit from running on iOS 11 devices. This is because launchd keeps a
codesigned cache of XPC services, and refuses to launch services that aren't in the cache.

It's not possibe for us to rebuild the cache with the new service name (only Apple's
production build system can do this), and disabling the cache or opting WebKit's XPC
services out of the cache might have a negative impact on our performance testing.

For now we'll retain the name "com.apple.WebKit.Databases" on iOS 11 devices to work around
this issue. If we find a way to allow the new service to run without impacting performance,
we can revert this change.

We will rename the service to "com.apple.WebKit.Storage" on macOS and iOS Simulator, and in
a follow-up patch we'll use the new service name on post-iOS 11 device builds.

  • Configurations/BaseTarget.xcconfig: Defined WK_STORAGE_SERVICE_PRODUCT_NAME to be

com.apple.WebKit.Databases by default, and overrode it to com.apple.WebKit.Storage on macOS
and iOS Simulator.

  • Configurations/StorageService.xcconfig: Changed PRODUCT_NAME to $(WK_STORAGE_SERVICE_PRODUCT_NAME).
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::serviceName): Changed to return "com.apple.WebKit.Storage" on macOS and
iOS Simulator platforms.

  • WebKit.xcodeproj/project.pbxproj: Updated the "Copy XPC services for engineering builds"

build phase to use WK_STORAGE_SERVICE_PRODUCT_NAME.

Tools:

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::databaseProcessName): Updated to return
"com.apple.WebKit.Storage.Development" on macOS and iOS Simulator.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r220499 r220501  
     12017-08-09  Andy Estes  <aestes@apple.com>
     2
     3        Part 3 of: Rename DatabaseProcess to StorageProcess
     4        https://bugs.webkit.org/show_bug.cgi?id=175034
     5
     6        Reviewed by Brady Eidson.
     7
     8        We tried renaming com.apple.WebKit.Databases to com.apple.WebKit.Storage in r219986, but
     9        this prevented trunk WebKit from running on iOS 11 devices. This is because launchd keeps a
     10        codesigned cache of XPC services, and refuses to launch services that aren't in the cache.
     11
     12        It's not possibe for us to rebuild the cache with the new service name (only Apple's
     13        production build system can do this), and disabling the cache or opting WebKit's XPC
     14        services out of the cache might have a negative impact on our performance testing.
     15
     16        For now we'll retain the name "com.apple.WebKit.Databases" on iOS 11 devices to work around
     17        this issue. If we find a way to allow the new service to run without impacting performance,
     18        we can revert this change.
     19
     20        We will rename the service to "com.apple.WebKit.Storage" on macOS and iOS Simulator, and in
     21        a follow-up patch we'll use the new service name on post-iOS 11 device builds.
     22
     23        * Configurations/BaseTarget.xcconfig: Defined WK_STORAGE_SERVICE_PRODUCT_NAME to be
     24        com.apple.WebKit.Databases by default, and overrode it to com.apple.WebKit.Storage on macOS
     25        and iOS Simulator.
     26        * Configurations/StorageService.xcconfig: Changed PRODUCT_NAME to $(WK_STORAGE_SERVICE_PRODUCT_NAME).
     27        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
     28        (WebKit::serviceName): Changed to return "com.apple.WebKit.Storage" on macOS and
     29        iOS Simulator platforms.
     30        * WebKit.xcodeproj/project.pbxproj: Updated the "Copy XPC services for engineering builds"
     31        build phase to use WK_STORAGE_SERVICE_PRODUCT_NAME.
     32
    1332017-08-09  Commit Queue  <commit-queue@webkit.org>
    234
  • trunk/Source/WebKit/Configurations/BaseTarget.xcconfig

    r219155 r220501  
    106106WK_CORE_PREDICTION_DEFINES = $(WK_CORE_PREDICTION_DEFINES_$(WK_HAVE_CORE_PREDICTION));
    107107WK_CORE_PREDICTION_DEFINES_YES = HAVE_CORE_PREDICTION;
     108
     109WK_STORAGE_SERVICE_PRODUCT_NAME = com.apple.WebKit.Databases;
     110WK_STORAGE_SERVICE_PRODUCT_NAME[sdk=macosx*] = com.apple.WebKit.Storage;
     111WK_STORAGE_SERVICE_PRODUCT_NAME[sdk=*simulator*] = com.apple.WebKit.Storage;
  • trunk/Source/WebKit/Configurations/StorageService.xcconfig

    r220094 r220501  
    2626WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE = Databases-iOS;
    2727
    28 PRODUCT_NAME = com.apple.WebKit.Databases;
     28PRODUCT_NAME = $(WK_STORAGE_SERVICE_PRODUCT_NAME);
    2929PRODUCT_BUNDLE_IDENTIFIER = $(PRODUCT_NAME);
    3030INFOPLIST_FILE = StorageProcess/EntryPoint/mac/XPCService/StorageService/Info.plist;
  • trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm

    r220105 r220501  
    5757        return "com.apple.WebKit.Networking";
    5858    case ProcessLauncher::ProcessType::Storage:
     59#if PLATFORM(MAC) || PLATFORM(IOS_SIMULATOR)
     60        return "com.apple.WebKit.Storage";
     61#else
    5962        return "com.apple.WebKit.Databases";
     63#endif
    6064#if ENABLE(NETSCAPE_PLUGIN_API)
    6165    case ProcessLauncher::ProcessType::Plugin32:
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r220442 r220501  
    33843384                51F060DD1654317500F3282E /* NetworkRTCProviderMessageReceiver.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkRTCProviderMessageReceiver.cpp; sourceTree = "<group>"; };
    33853385                51F060DE1654317500F3281B /* WebResourceLoaderMessages.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebResourceLoaderMessages.h; sourceTree = "<group>"; };
    3386                 51F7DC4A180CC93600212CA3 /* com.apple.WebKit.Databases.xpc */ = {isa = PBXFileReference; explicitFileType = "wrapper.xpc-service"; includeInIndex = 0; path = com.apple.WebKit.Databases.xpc; sourceTree = BUILT_PRODUCTS_DIR; };
     3386                51F7DC4A180CC93600212CA3 /* com.apple.WebKit.Storage.xpc */ = {isa = PBXFileReference; explicitFileType = "wrapper.xpc-service"; includeInIndex = 0; path = com.apple.WebKit.Storage.xpc; sourceTree = BUILT_PRODUCTS_DIR; };
    33873387                51F886A31F2C214A00C193EF /* WKTestingSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKTestingSupport.cpp; sourceTree = "<group>"; };
    33883388                51F886A41F2C214A00C193EF /* WKTestingSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKTestingSupport.h; sourceTree = "<group>"; };
     
    45044504                        isa = PBXGroup;
    45054505                        children = (
    4506                                 51F7DC4A180CC93600212CA3 /* com.apple.WebKit.Databases.xpc */,
    45074506                                BC8283B116B4BF7700A278FE /* com.apple.WebKit.Networking.xpc */,
    45084507                                BC8283F916B4FDDE00A278FE /* com.apple.WebKit.Plugin.32.xpc */,
    45094508                                BC82841F16B4FDF600A278FE /* com.apple.WebKit.Plugin.64.xpc */,
     4509                                51F7DC4A180CC93600212CA3 /* com.apple.WebKit.Storage.xpc */,
    45104510                                BC3DE46615A91763008D26FC /* com.apple.WebKit.WebContent.xpc */,
    45114511                                1AC25FB012A48EA700BD2671 /* PluginProcessShim.dylib */,
     
    47664766                                5DAD73F1116FF90C00EE5396 /* BaseTarget.xcconfig */,
    47674767                                BCACC40D16B0B7BE00B6E092 /* BaseXPCService.xcconfig */,
     4768                                A7BD9863194653D400D35698 /* Databases-iOS.entitlements */,
    47684769                                1A4F976B100E7B6600637A18 /* DebugRelease.xcconfig */,
    47694770                                1A4F976C100E7B6600637A18 /* FeatureDefines.xcconfig */,
     
    47774778                                A1EDD2DC1884B9B500BBFE98 /* SecItemShim.xcconfig */,
    47784779                                5183B3931379F85C00E8754E /* Shim.xcconfig */,
    4779                                 A7BD9863194653D400D35698 /* Databases-iOS.entitlements */,
    47804780                                51A60B29180CCD9000F3BF50 /* StorageService.xcconfig */,
    47814781                                1A4F976E100E7B6600637A18 /* Version.xcconfig */,
     
    59625962                                510CC7DC16138E2900D03ED3 /* mac */,
    59635963                                413075971DE84ED70039EC69 /* webrtc */,
    5964                                 46DF06391F3905E5001980BB /* NetworkCORSPreflightChecker.cpp */,
    5965                                 46DF063A1F3905E5001980BB /* NetworkCORSPreflightChecker.h */,
    59665964                                513A16491630A9BF005D7D22 /* NetworkConnectionToWebProcess.cpp */,
    59675965                                513A164A1630A9BF005D7D22 /* NetworkConnectionToWebProcess.h */,
    59685966                                513A164B1630A9BF005D7D22 /* NetworkConnectionToWebProcess.messages.in */,
     5967                                46DF06391F3905E5001980BB /* NetworkCORSPreflightChecker.cpp */,
     5968                                46DF063A1F3905E5001980BB /* NetworkCORSPreflightChecker.h */,
    59695969                                532159511DBAE6FC0054AA3C /* NetworkDataTask.cpp */,
    59705970                                5CBC9B891C6524A500A8FDCF /* NetworkDataTask.h */,
     
    84848484                                513A164D1630A9BF005D7D22 /* NetworkConnectionToWebProcess.h in Headers */,
    84858485                                51DD9F2916367DA2001578E9 /* NetworkConnectionToWebProcessMessages.h in Headers */,
     8486                                46DF063C1F3905F8001980BB /* NetworkCORSPreflightChecker.h in Headers */,
    84868487                                5CBC9B8E1C652CA000A8FDCF /* NetworkDataTask.h in Headers */,
    84878488                                53BA47D11DC2EF5E004DF4AD /* NetworkDataTaskBlob.h in Headers */,
     
    85888589                                E1B78471163F24690007B692 /* RemoteNetworkingContext.h in Headers */,
    85898590                                1A5704FC1BE1751100874AF1 /* RemoteObjectInvocation.h in Headers */,
    8590                                 46DF063C1F3905F8001980BB /* NetworkCORSPreflightChecker.h in Headers */,
    85918591                                1AC1338018590AE400F3EC05 /* RemoteObjectRegistry.h in Headers */,
    85928592                                1AC1338618590C4600F3EC05 /* RemoteObjectRegistryMessages.h in Headers */,
     
    92689268                        name = Databases;
    92699269                        productName = Networking;
    9270                         productReference = 51F7DC4A180CC93600212CA3 /* com.apple.WebKit.Databases.xpc */;
     9270                        productReference = 51F7DC4A180CC93600212CA3 /* com.apple.WebKit.Storage.xpc */;
    92719271                        productType = "com.apple.product-type.xpc-service";
    92729272                };
     
    97339733                                "$(BUILT_PRODUCTS_DIR)/com.apple.WebKit.Plugin.32.xpc",
    97349734                                "$(BUILT_PRODUCTS_DIR)/com.apple.WebKit.Plugin.64.xpc",
    9735                                 "$(BUILT_PRODUCTS_DIR)/com.apple.WebKit.Databases.xpc",
     9735                                "$(BUILT_PRODUCTS_DIR)/$(WK_STORAGE_SERVICE_PRODUCT_NAME).xpc",
    97369736                        );
    97379737                        name = "Copy XPC services for engineering builds";
     
    97419741                                "$(BUILT_PRODUCTS_DIR)/WebKit.framework/XPCServices/com.apple.WebKit.Plugin.32.xpc",
    97429742                                "$(BUILT_PRODUCTS_DIR)/WebKit.framework/XPCServices/com.apple.WebKit.Plugin.64.xpc",
    9743                                 "$(BUILT_PRODUCTS_DIR)/WebKit.framework/XPCServices/com.apple.WebKit.Databases.xpc",
     9743                                "$(BUILT_PRODUCTS_DIR)/WebKit.framework/XPCServices/$(WK_STORAGE_SERVICE_PRODUCT_NAME).xpc",
    97449744                        );
    97459745                        runOnlyForDeploymentPostprocessing = 0;
    97469746                        shellPath = /bin/sh;
    9747                         shellScript = "if [[ \"${CONFIGURATION}\" == \"Production\" ]]; then\n    exit\nfi\n\nif [[ ${PLATFORM_NAME} != \"macosx\" ]]; then\n    XPC_SERVICES_PATH=\"${BUILT_PRODUCTS_DIR}/WebKit.framework/XPCServices\"\nelse\n    XPC_SERVICES_PATH=\"${BUILT_PRODUCTS_DIR}/WebKit.framework/Versions/A/XPCServices\"\nfi\n\nmkdir -p \"${XPC_SERVICES_PATH}\"\nditto \"${BUILT_PRODUCTS_DIR}/com.apple.WebKit.WebContent.xpc\" \"${XPC_SERVICES_PATH}/com.apple.WebKit.WebContent.xpc\"\nditto \"${BUILT_PRODUCTS_DIR}/com.apple.WebKit.Networking.xpc\" \"${XPC_SERVICES_PATH}/com.apple.WebKit.Networking.xpc\"\nditto \"${BUILT_PRODUCTS_DIR}/com.apple.WebKit.Databases.xpc\" \"${XPC_SERVICES_PATH}/com.apple.WebKit.Databases.xpc\"\n\nif [[ ${PLATFORM_NAME} == macosx ]]; then\n    ditto \"${BUILT_PRODUCTS_DIR}/com.apple.WebKit.Plugin.32.xpc\" \"${XPC_SERVICES_PATH}/com.apple.WebKit.Plugin.xpc\"\n    ditto \"${BUILT_PRODUCTS_DIR}/com.apple.WebKit.Plugin.64.xpc\" \"${XPC_SERVICES_PATH}/com.apple.WebKit.Plugin.64.xpc\"\nfi\n";
     9747                        shellScript = "if [[ \"${CONFIGURATION}\" == \"Production\" ]]; then\n    exit\nfi\n\nif [[ ${PLATFORM_NAME} != \"macosx\" ]]; then\n    XPC_SERVICES_PATH=\"${BUILT_PRODUCTS_DIR}/WebKit.framework/XPCServices\"\nelse\n    XPC_SERVICES_PATH=\"${BUILT_PRODUCTS_DIR}/WebKit.framework/Versions/A/XPCServices\"\nfi\n\nmkdir -p \"${XPC_SERVICES_PATH}\"\nditto \"${BUILT_PRODUCTS_DIR}/com.apple.WebKit.WebContent.xpc\" \"${XPC_SERVICES_PATH}/com.apple.WebKit.WebContent.xpc\"\nditto \"${BUILT_PRODUCTS_DIR}/com.apple.WebKit.Networking.xpc\" \"${XPC_SERVICES_PATH}/com.apple.WebKit.Networking.xpc\"\nditto \"${BUILT_PRODUCTS_DIR}/${WK_STORAGE_SERVICE_PRODUCT_NAME}.xpc\" \"${XPC_SERVICES_PATH}/${WK_STORAGE_SERVICE_PRODUCT_NAME}.xpc\"\n\nif [[ ${PLATFORM_NAME} == macosx ]]; then\n    ditto \"${BUILT_PRODUCTS_DIR}/com.apple.WebKit.Plugin.32.xpc\" \"${XPC_SERVICES_PATH}/com.apple.WebKit.Plugin.xpc\"\n    ditto \"${BUILT_PRODUCTS_DIR}/com.apple.WebKit.Plugin.64.xpc\" \"${XPC_SERVICES_PATH}/com.apple.WebKit.Plugin.64.xpc\"\nfi\n";
    97489748                };
    97499749                C0CE72841247E66800BC0EC4 /* Generate Derived Sources */ = {
     
    98719871                                E1A31735134CEA80007C9A4F /* AttributedString.mm in Sources */,
    98729872                                512F589612A8838800629530 /* AuthenticationChallengeProxy.cpp in Sources */,
    9873                                 46DF063B1F3905F8001980BB /* NetworkCORSPreflightChecker.cpp in Sources */,
    98749873                                512F589812A8838800629530 /* AuthenticationDecisionListener.cpp in Sources */,
    98759874                                518E8EF816B2091C00E91429 /* AuthenticationManager.cpp in Sources */,
     
    1003510034                                513A164C1630A9BF005D7D22 /* NetworkConnectionToWebProcess.cpp in Sources */,
    1003610035                                51DD9F2816367DA2001578E9 /* NetworkConnectionToWebProcessMessageReceiver.cpp in Sources */,
     10036                                46DF063B1F3905F8001980BB /* NetworkCORSPreflightChecker.cpp in Sources */,
    1003710037                                532159541DBAE71D0054AA3C /* NetworkDataTask.cpp in Sources */,
    1003810038                                53BA47D01DC2EF5E004DF4AD /* NetworkDataTaskBlob.cpp in Sources */,
     
    1009410094                                5C85C7881C3F23CE0061A4FA /* PendingDownload.cpp in Sources */,
    1009510095                                832ED18B1E2FE157006BA64A /* PerActivityStateCPUUsageSampler.cpp in Sources */,
     10096                                462107D81F38DBDB00DD7810 /* PingLoad.cpp in Sources */,
    1009610097                                0F5E200318E77051003EC3E5 /* PlatformCAAnimationRemote.mm in Sources */,
    1009710098                                2DA049B3180CCCD300AAFA9E /* PlatformCALayerRemote.cpp in Sources */,
     
    1021210213                                51E35200180F5D0F00E53BE9 /* StorageToWebProcessConnection.cpp in Sources */,
    1021310214                                5118E9AC1F295977003EF9F5 /* StorageToWebProcessConnectionMessageReceiver.cpp in Sources */,
    10214                                 462107D81F38DBDB00DD7810 /* PingLoad.cpp in Sources */,
    1021510215                                1AE00D6B18327C1200087DD7 /* StringReference.cpp in Sources */,
    1021610216                                296BD85E15019BC30071F424 /* StringUtilities.mm in Sources */,
  • trunk/Tools/ChangeLog

    r220499 r220501  
     12017-08-09  Andy Estes  <aestes@apple.com>
     2
     3        Part 3 of: Rename DatabaseProcess to StorageProcess
     4        https://bugs.webkit.org/show_bug.cgi?id=175034
     5
     6        Reviewed by Brady Eidson.
     7
     8        * WebKitTestRunner/TestController.cpp:
     9        (WTR::TestController::databaseProcessName): Updated to return
     10        "com.apple.WebKit.Storage.Development" on macOS and iOS Simulator.
     11
    1122017-08-09  Commit Queue  <commit-queue@webkit.org>
    213
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r220412 r220501  
    891891    return "com.apple.WebKit.Databases";
    892892#elif PLATFORM(COCOA)
    893     return "com.apple.WebKit.Databases.Development";
     893    return "com.apple.WebKit.Storage.Development";
    894894#else
    895895    return "DatabaseProcess";
Note: See TracChangeset for help on using the changeset viewer.