Move WKWebViewConfiguration validation to WKWebView construction
Created attachment 324935 [details] Patch
Comment on attachment 324935 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=324935&action=review > Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:484 > + if (![_configuration processPool]) > + [NSException raise:NSInvalidArgumentException format:@"configuration.processPool is nil"]; > + > + if (![_configuration preferences]) > + [NSException raise:NSInvalidArgumentException format:@"configuration.preferences is nil"]; > + > + if (![_configuration userContentController]) > + [NSException raise:NSInvalidArgumentException format:@"configuration.userContentController is nil"]; > + > + if (![_configuration websiteDataStore]) > + [NSException raise:NSInvalidArgumentException format:@"configuration.websiteDataStore is nil"]; > + > + if (![_configuration _visitedLinkStore]) > + [NSException raise:NSInvalidArgumentException format:@"configuration._visitedLinkStore is nil"]; > + > +#if PLATFORM(IOS) > + if (![_configuration _contentProviderRegistry]) > + [NSException raise:NSInvalidArgumentException format:@"configuration._contentProviderRegistry is nil"]; > +#endif I still think you should put this in a separate method.
Created attachment 325037 [details] Patch
Created attachment 325041 [details] Patch
Comment on attachment 325041 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325041&action=review > Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:450 > +- (void)_validateConfiguration:(WKWebViewConfiguration *)configuration maybe this can just be a free function? > Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm:52 > + [configuration setProcessPool: nil]; No spaces after colons!
http://trac.webkit.org/r224071
<rdar://problem/35568043>