Unable to run system Safari with trunk WebKit
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Apr 2019 23:43:10 +0000 (23:43 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Apr 2019 23:43:10 +0000 (23:43 +0000)
commit46484c916c385b08d70c42c21a0f9d6ec3a4d067
tree9948fd0eb6a174c1ffc378f0a2b7a885841858c4
parente336831a141b71c02e5f786c452ca40813d36002
Unable to run system Safari with trunk WebKit
https://bugs.webkit.org/show_bug.cgi?id=196777
<rdar://problem/49784574>

Reviewed by Alex Christensen.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
Add a linkedOnAfter check so that throwing exceptions when related web views use a different
data store only happens for apps rebuilt using recent SDK.

* UIProcess/Cocoa/VersionChecks.h:
* UIProcess/Cocoa/VersionChecks.mm:
(WebKit::linkedOnOrAfter):
- By default, linkedOnOrAfter assumed Safari / MobileSafari is always linked-on-after. To satisfy my
  use cases, I introduced a new AssumeSafariIsAlwaysLinkedOnAfter parameter so that this behavior can
  be controlled by the caller.
- In the header, DYLD_IOS_VERSION_* / DYLD_MACOS_VERSION_* constants are 0 when building with the
  non-internal SDK. As a result, the check instead linkedOnOrAfter() would cause us to always return
  true, which was wrong. I therefore updated the check inside linkedOnOrAfter() to special-case the
  0 value for sdkVersion.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
Source/WebKit/Shared/WebPreferencesDefaultValues.h
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/Cocoa/VersionChecks.h
Source/WebKit/UIProcess/Cocoa/VersionChecks.mm