Bug 178181

Summary: [iOS] Conditionally rename DatabaseProcess to StorageProcess when building for iOS devices
Product: WebKit Reporter: Andy Estes <aestes>
Component: New BugsAssignee: Andy Estes <aestes>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, commit-queue, mitz, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=175034
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Andy Estes 2017-10-11 12:12:53 PDT
[iOS] Conditionally rename DatabaseProcess to StorageProcess when building for iOS devices
Comment 1 Andy Estes 2017-10-11 12:17:19 PDT
Created attachment 323443 [details]
Patch
Comment 2 Andy Estes 2017-10-11 12:18:08 PDT
rdar://problem/33660282
Comment 3 Andy Estes 2017-10-11 17:08:13 PDT
Created attachment 323492 [details]
Patch
Comment 4 mitz 2017-10-11 22:52:23 PDT
Comment on attachment 323492 [details]
Patch

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

> Source/WebKit/Configurations/BaseTarget.xcconfig:120
> +WK_STORAGE_SERVICE_PRODUCT_NAME = com.apple.WebKit.Storage;
> +WK_STORAGE_SERVICE_PRODUCT_NAME[sdk=iphoneos11*] = $(WK_STORAGE_SERVICE_PRODUCT_NAME_IPHONEOS_11$(IPHONEOS_DEPLOYMENT_TARGET:suffix:identifier));
> +WK_STORAGE_SERVICE_PRODUCT_NAME_IPHONEOS_11_0 = com.apple.WebKit.Databases;
> +WK_STORAGE_SERVICE_PRODUCT_NAME_IPHONEOS_11_1 = com.apple.WebKit.Databases;
> +WK_STORAGE_SERVICE_PRODUCT_NAME_IPHONEOS_11_2 = com.apple.WebKit.Databases;
> +WK_STORAGE_SERVICE_PRODUCT_NAME_IPHONEOS_11_3 = com.apple.WebKit.Storage;
> +WK_STORAGE_SERVICE_PRODUCT_NAME_IPHONEOS_11_4 = com.apple.WebKit.Storage;
> +WK_STORAGE_SERVICE_PRODUCT_NAME_IPHONEOS_11_5 = com.apple.WebKit.Storage;
> +WK_STORAGE_SERVICE_PRODUCT_NAME_IPHONEOS_11_6 = com.apple.WebKit.Storage;
> +WK_STORAGE_SERVICE_PRODUCT_NAME_IPHONEOS_11_7 = com.apple.WebKit.Storage;
> +WK_STORAGE_SERVICE_PRODUCT_NAME_IPHONEOS_11_8 = com.apple.WebKit.Storage;
> +WK_STORAGE_SERVICE_PRODUCT_NAME_IPHONEOS_11_9 = com.apple.WebKit.Storage;

This can be written slightly more succinctly by enumerating just the exceptional cases. Something along the lines of (typed here without testing):

WK_STORAGE_SERVICE_PRODUCT_NAME = $(WK_STORAGE_SERVICE_PRODUCT_NAME_$(WK_USE_LEGACY_STORAGE_SERVICE_NAME));
WK_STORAGE_SERVICE_PRODUCT_NAME_ = $(WK_STORAGE_SERVICE_PRODUCT_NAME_NO);
WK_STORAGE_SERVICE_PRODUCT_NAME_NO = com.apple.WebKit.Storage;
WK_STORAGE_SERVICE_PRODUCT_NAME_YES = com.apple.WebKit.Databases;

WK_USE_LEGACY_STORAGE_SERVICE_NAME[sdk=iphoneos11*] = $(WK_USE_LEGACY_STORAGE_SERVICE_NAME_$(IPHONEOS_DEPLOYMENT_TARGET:suffix:identifier));
WK_USE_LEGACY_STORAGE_SERVICE_NAME_11_0 = YES;
WK_USE_LEGACY_STORAGE_SERVICE_NAME_11_1 = YES;
WK_USE_LEGACY_STORAGE_SERVICE_NAME_11_2 = YES;
Comment 5 Andy Estes 2017-10-12 11:01:35 PDT
Created attachment 323534 [details]
Patch
Comment 6 WebKit Commit Bot 2017-10-12 12:12:07 PDT
Comment on attachment 323534 [details]
Patch

Clearing flags on attachment: 323534

Committed r223247: <https://trac.webkit.org/changeset/223247>
Comment 7 WebKit Commit Bot 2017-10-12 12:12:09 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Andy Estes 2017-10-19 15:46:03 PDT
Rolled out in r223559: <https://trac.webkit.org/changeset/223559>
Comment 9 Andy Estes 2017-10-19 15:47:54 PDT
Committed r223719: <https://trac.webkit.org/changeset/223719>