Bug 152950 - [Cocoa] Add SPI to opt out a URL scheme from the memory cache
Summary: [Cocoa] Add SPI to opt out a URL scheme from the memory cache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy Estes
URL:
Keywords: InRadar
Depends on: 152986
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-09 16:30 PST by Andy Estes
Modified: 2016-01-11 18:12 PST (History)
9 users (show)

See Also:


Attachments
Patch (27.50 KB, patch)
2016-01-09 16:41 PST, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (28.45 KB, patch)
2016-01-09 22:19 PST, Andy Estes
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Estes 2016-01-09 16:30:38 PST
[Cocoa] Add SPI to opt out a URL scheme from the memory cache
Comment 1 Andy Estes 2016-01-09 16:34:42 PST
rdar://problem/24066652
Comment 2 Andy Estes 2016-01-09 16:41:08 PST
Created attachment 268632 [details]
Patch
Comment 3 Andy Estes 2016-01-09 22:19:04 PST
Created attachment 268641 [details]
Patch
Comment 4 Tim Horton 2016-01-11 13:07:39 PST
Comment on attachment 268641 [details]
Patch

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

> Source/WebKit2/Shared/WebProcessCreationParameters.h:99
>      Vector<String> urlSchemesRegisteredAsCORSEnabled;
> +    Vector<String> urlSchemesToRegisterAsAlwaysRevalidated;

"RegisteredAs" vs. "ToRegisterAs"?

> Source/WebKit2/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:38
> +@property (nonatomic, copy) WK_ARRAY(NSString *) *alwaysRevalidatedURLSchemes WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);

Do we still need to do the WK_ARRAY dance?
Comment 5 Andy Estes 2016-01-11 13:55:44 PST
(In reply to comment #4)
> Comment on attachment 268641 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=268641&action=review
> 
> > Source/WebKit2/Shared/WebProcessCreationParameters.h:99
> >      Vector<String> urlSchemesRegisteredAsCORSEnabled;
> > +    Vector<String> urlSchemesToRegisterAsAlwaysRevalidated;
> 
> "RegisteredAs" vs. "ToRegisterAs"?

Ah, yeah. I'll fix this in a follow-up.

> 
> > Source/WebKit2/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:38
> > +@property (nonatomic, copy) WK_ARRAY(NSString *) *alwaysRevalidatedURLSchemes WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
> 
> Do we still need to do the WK_ARRAY dance?

Not sure. I think it's ok to use it now. Presumably we'll remove the macros when the time is right.

Thanks for the review!
Comment 6 WebKit Commit Bot 2016-01-11 13:57:24 PST
Comment on attachment 268641 [details]
Patch

Clearing flags on attachment: 268641

Committed r194866: <http://trac.webkit.org/changeset/194866>
Comment 7 WebKit Commit Bot 2016-01-11 13:57:29 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 WebKit Commit Bot 2016-01-11 14:25:41 PST
Re-opened since this is blocked by bug 152986
Comment 9 Ryan Haddad 2016-01-11 14:36:44 PST
/Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.framework/PrivateHeaders/_WKProcessPoolConfiguration.h:31:20: error: expected parameter declarator
/Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.framework/PrivateHeaders/_WKProcessPoolConfiguration.h:31:20: error: expected ')'
/Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.framework/PrivateHeaders/_WKProcessPoolConfiguration.h:32:1: error: expected function body after function declarator
/Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.framework/PrivateHeaders/_WKProcessPoolConfiguration.h:35:1: error: unexpected '@' in program
/Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.framework/PrivateHeaders/_WKProcessPoolConfiguration.h:36:1: error: unexpected '@' in program
/Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.framework/PrivateHeaders/_WKProcessPoolConfiguration.h:37:1: error: unexpected '@' in program
/Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.framework/PrivateHeaders/_WKProcessPoolConfiguration.h:38:1: error: unexpected '@' in program
/Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.framework/PrivateHeaders/_WKProcessPoolConfiguration.h:40:1: error: '@end' must appear in an Objective-C context
/Volumes/Data/slave/elcapitan-release/build/Tools/MiniBrowser/mac/AppDelegate.m:78:73: error: receiver '_WKProcessPoolConfiguration' is a forward class and corresponding @interface may not exist [-Werror,-Wreceiver-forward-class]
/Volumes/Data/slave/elcapitan-release/build/Tools/MiniBrowser/mac/AppDelegate.m:78:108: error: 'init' is deprecated: first deprecated in OS X 10.11 - Use -initWithConcurrencyType: instead [-Werror,-Wdeprecated-declarations]
/Volumes/Data/slave/elcapitan-release/build/Tools/MiniBrowser/mac/AppDelegate.m:79:40: error: property 'maximumProcessCount' cannot be found in forward class object '_WKProcessPoolConfiguration'

<https://build.webkit.org/builders/Apple%20El%20Capitan%20Release%20%28Build%29/builds/2571>
Comment 10 Andy Estes 2016-01-11 17:33:35 PST
(In reply to comment #9)
> /Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.
> framework/PrivateHeaders/_WKProcessPoolConfiguration.h:31:20: error:
> expected parameter declarator
> /Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.
> framework/PrivateHeaders/_WKProcessPoolConfiguration.h:31:20: error:
> expected ')'
> /Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.
> framework/PrivateHeaders/_WKProcessPoolConfiguration.h:32:1: error: expected
> function body after function declarator
> /Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.
> framework/PrivateHeaders/_WKProcessPoolConfiguration.h:35:1: error:
> unexpected '@' in program
> /Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.
> framework/PrivateHeaders/_WKProcessPoolConfiguration.h:36:1: error:
> unexpected '@' in program
> /Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.
> framework/PrivateHeaders/_WKProcessPoolConfiguration.h:37:1: error:
> unexpected '@' in program
> /Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.
> framework/PrivateHeaders/_WKProcessPoolConfiguration.h:38:1: error:
> unexpected '@' in program
> /Volumes/Data/slave/elcapitan-release/build/WebKitBuild/Release/WebKit.
> framework/PrivateHeaders/_WKProcessPoolConfiguration.h:40:1: error: '@end'
> must appear in an Objective-C context
> /Volumes/Data/slave/elcapitan-release/build/Tools/MiniBrowser/mac/
> AppDelegate.m:78:73: error: receiver '_WKProcessPoolConfiguration' is a
> forward class and corresponding @interface may not exist
> [-Werror,-Wreceiver-forward-class]
> /Volumes/Data/slave/elcapitan-release/build/Tools/MiniBrowser/mac/
> AppDelegate.m:78:108: error: 'init' is deprecated: first deprecated in OS X
> 10.11 - Use -initWithConcurrencyType: instead
> [-Werror,-Wdeprecated-declarations]
> /Volumes/Data/slave/elcapitan-release/build/Tools/MiniBrowser/mac/
> AppDelegate.m:79:40: error: property 'maximumProcessCount' cannot be found
> in forward class object '_WKProcessPoolConfiguration'
> 
> <https://build.webkit.org/builders/
> Apple%20El%20Capitan%20Release%20%28Build%29/builds/2571>

Ah, this is strange. The WKFoundation.h in WebKitBuild/Release/WebKit.framework/Headers/ was created before header post-processing was disabled on El Capitan, so the macros that should replace WK_CLASS_AVAILABLE, WK_AVAILABLE, and WK_ARRAY in _WKProcessPoolConfiguration.h were removed by the "Postprocess WKFoundation.h" build phase. With the header post-processing build phase now disabled, but no changes made to WKFoundation.h that would cause it to be re-postprocessed, there is nothing to handle the WK_* macros in _WKProcessPoolPrivate.h.

This could be fixed by a clean build on the bots, or a whitespace-only change to WKFoundation.h, or possibly by an even more robust solution that I'm not aware of.
Comment 11 Andy Estes 2016-01-11 17:34:51 PST
(In reply to comment #10)
> 
> ... there is nothing to handle the WK_* macros in _WKProcessPoolPrivate.h.
> 

_WKProcessPoolConfiguration.h, that is.
Comment 12 Andy Estes 2016-01-11 18:12:54 PST
Committed r194880: <http://trac.webkit.org/changeset/194880>