Deprecate WKContextCreateWithInjectedBundlePath
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Apr 2019 00:15:03 +0000 (00:15 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Apr 2019 00:15:03 +0000 (00:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197169

Patch by Alex Christensen <achristensen@webkit.org> on 2019-04-22
Reviewed by Youenn Fablet.

Source/WebKit:

* UIProcess/API/C/WKContext.h:

Tools:

* TestWebKitAPI/PlatformUtilities.cpp:
(TestWebKitAPI::Util::createContextWithInjectedBundle):
Use WKContextCreateWithConfiguration instead of WKContextCreateWithInjectedBundlePath after having set its injected bundle path.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244529 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/C/WKContext.h
Tools/ChangeLog
Tools/TestWebKitAPI/PlatformUtilities.cpp

index 5aa1e65..d508ce5 100644 (file)
@@ -1,5 +1,14 @@
 2019-04-22  Alex Christensen  <achristensen@webkit.org>
 
 2019-04-22  Alex Christensen  <achristensen@webkit.org>
 
+        Deprecate WKContextCreateWithInjectedBundlePath
+        https://bugs.webkit.org/show_bug.cgi?id=197169
+
+        Reviewed by Youenn Fablet.
+
+        * UIProcess/API/C/WKContext.h:
+
+2019-04-22  Alex Christensen  <achristensen@webkit.org>
+
         REGRESSION(r230681) Do not use stored credentials if WKBundlePageResourceLoadClient.shouldUseCredentialStorage returns false
         https://bugs.webkit.org/show_bug.cgi?id=197093
         <rdar://problem/49708268>
         REGRESSION(r230681) Do not use stored credentials if WKBundlePageResourceLoadClient.shouldUseCredentialStorage returns false
         https://bugs.webkit.org/show_bug.cgi?id=197093
         <rdar://problem/49708268>
index 3166e37..acd2015 100644 (file)
@@ -107,7 +107,7 @@ typedef uint32_t WKStatisticsOptions;
 WK_EXPORT WKTypeID WKContextGetTypeID();
 
 WK_EXPORT WKContextRef WKContextCreate() WK_C_API_DEPRECATED_WITH_REPLACEMENT(WKContextCreateWithConfiguration);
 WK_EXPORT WKTypeID WKContextGetTypeID();
 
 WK_EXPORT WKContextRef WKContextCreate() WK_C_API_DEPRECATED_WITH_REPLACEMENT(WKContextCreateWithConfiguration);
-WK_EXPORT WKContextRef WKContextCreateWithInjectedBundlePath(WKStringRef path);
+WK_EXPORT WKContextRef WKContextCreateWithInjectedBundlePath(WKStringRef path) WK_C_API_DEPRECATED_WITH_REPLACEMENT(WKContextCreateWithConfiguration);
 WK_EXPORT WKContextRef WKContextCreateWithConfiguration(WKContextConfigurationRef configuration);
 
 WK_EXPORT void WKContextSetClient(WKContextRef context, const WKContextClientBase* client);
 WK_EXPORT WKContextRef WKContextCreateWithConfiguration(WKContextConfigurationRef configuration);
 
 WK_EXPORT void WKContextSetClient(WKContextRef context, const WKContextClientBase* client);
index c766ffd..4078008 100644 (file)
@@ -1,5 +1,16 @@
 2019-04-22  Alex Christensen  <achristensen@webkit.org>
 
 2019-04-22  Alex Christensen  <achristensen@webkit.org>
 
+        Deprecate WKContextCreateWithInjectedBundlePath
+        https://bugs.webkit.org/show_bug.cgi?id=197169
+
+        Reviewed by Youenn Fablet.
+
+        * TestWebKitAPI/PlatformUtilities.cpp:
+        (TestWebKitAPI::Util::createContextWithInjectedBundle):
+        Use WKContextCreateWithConfiguration instead of WKContextCreateWithInjectedBundlePath after having set its injected bundle path.
+
+2019-04-22  Alex Christensen  <achristensen@webkit.org>
+
         REGRESSION(r230681) Do not use stored credentials if WKBundlePageResourceLoadClient.shouldUseCredentialStorage returns false
         https://bugs.webkit.org/show_bug.cgi?id=197093
         <rdar://problem/49708268>
         REGRESSION(r230681) Do not use stored credentials if WKBundlePageResourceLoadClient.shouldUseCredentialStorage returns false
         https://bugs.webkit.org/show_bug.cgi?id=197093
         <rdar://problem/49708268>
index eca1c84..8f8d768 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "PlatformUtilities.h"
 
 #include "config.h"
 #include "PlatformUtilities.h"
 
+#include <WebKit/WKContextConfigurationRef.h>
 #include <wtf/StdLibExtras.h>
 
 namespace TestWebKitAPI {
 #include <wtf/StdLibExtras.h>
 
 namespace TestWebKitAPI {
@@ -36,9 +37,9 @@ namespace Util {
 WKContextRef createContextWithInjectedBundle()
 {
     WKRetainPtr<WKStringRef> injectedBundlePath = adoptWK(createInjectedBundlePath());
 WKContextRef createContextWithInjectedBundle()
 {
     WKRetainPtr<WKStringRef> injectedBundlePath = adoptWK(createInjectedBundlePath());
-    WKContextRef context = WKContextCreateWithInjectedBundlePath(injectedBundlePath.get());
-
-    return context;
+    auto configuration = adoptWK(WKContextConfigurationCreate());
+    WKContextConfigurationSetInjectedBundlePath(configuration.get(), injectedBundlePath.get());
+    return WKContextCreateWithConfiguration(configuration.get());
 }
 
 WKDictionaryRef createInitializationDictionaryForInjectedBundleTest(const std::string& testName, WKTypeRef userData)
 }
 
 WKDictionaryRef createInitializationDictionaryForInjectedBundleTest(const std::string& testName, WKTypeRef userData)