[Cocoa] WebKit unnecessarily soft-links CorePrediction
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Apr 2017 19:13:23 +0000 (19:13 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Apr 2017 19:13:23 +0000 (19:13 +0000)
commitef0169142a77543471cdbed68e017c938e17ed5b
tree2c8e8745b9c0a63ff9c369938d0f44b3a0d3b0a7
parentb98ed8f64a8ddab06c9e72886bf31d8e334d6cc6
[Cocoa] WebKit unnecessarily soft-links CorePrediction
https://bugs.webkit.org/show_bug.cgi?id=170644

Reviewed by Sam Weinig.

Source/WebKit2:

* Configurations/BaseTarget.xcconfig: Defined HAVE_CORE_PREDICTION and added
  HAVE_CORE_PREDICTION to the preprocessor defintions when the former is YES.

* Configurations/WebKit.xcconfig: Have the linker link against CorePrediction where
  available. On macOS, use weak linking, because CorePrediction is not available in the
  Base System.

* Platform/classifier/cocoa/CorePredictionSoftLink.h: Removed.

* Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp: Guarded with
  #if HAVE(CORE_PREDICTION).
(WebKit::isNullFunctionPointer): Added this helper.
(WebKit::ResourceLoadStatisticsClassifierCocoa::canUseCorePrediction): Replaced
  dlopen()-based runtime check with a null check.

* Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.h: Guarded with #if
  HAVE(CORE_PREDICTION).

* Platform/spi/Cocoa/CorePredictionSPI.h: Added.

* UIProcess/WebResourceLoadStatisticsStore.h: Updated guards to include HAVE(CORE_PREDICTION).

* WebKit2.xcodeproj/project.pbxproj: pdated file references for removal and addition.

WebKitLibraries:

* WebKitPrivateFrameworkStubs/iOS/10/CorePrediction.framework: Added this framework stub.
* WebKitPrivateFrameworkStubs/iOS/10/CorePrediction.framework/CorePrediction.tbd: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/BaseTarget.xcconfig
Source/WebKit2/Configurations/WebKit.xcconfig
Source/WebKit2/Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp
Source/WebKit2/Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.h
Source/WebKit2/Platform/spi/Cocoa/CorePredictionSPI.h [moved from Source/WebKit2/Platform/classifier/cocoa/CorePredictionSoftLink.h with 77% similarity]
Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.h
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/10/CorePrediction.framework/CorePrediction.tbd [new file with mode: 0644]