Title: [201492] trunk/Source
Revision
201492
Author
[email protected]
Date
2016-05-28 16:16:50 -0700 (Sat, 28 May 2016)

Log Message

Fix the build with newer clang and other custom configuration options
https://bugs.webkit.org/show_bug.cgi?id=158161

Reviewed by Dan Bernstein.

Source/WebCore:

* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::rateChanged): Added UNUSED_PARAMs for the
case where this function is unimplemented.
(WebCore::WebVideoFullscreenInterfaceMac::setExternalPlayback): Added a non-additions
version of this function.
* platform/spi/cf/CFNetworkSPI.h: Silence nullability-completeness (and other) warnings.
I doubt that it's practical to get these right for every SDK version at this time. Added
functions for overriding HTTPS certicate behavior that we used to declare in .m files.
* platform/spi/mac/AVFoundationSPI.h: Define AVAssetCache conditionally.

Source/WebKit2:

* NetworkProcess/ios/NetworkProcessIOS.mm: -setAllowsSpecificHTTPSCertificate:forHost:
is now in CFNetworkSPI.h
* NetworkProcess/mac/NetworkProcessMac.mm: Ditto.
* Shared/mac/CookieStorageShimLibrary.cpp:
(WebKit::WebKitCookieStorageShimInitialize): Use more portable std::call_once.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (201491 => 201492)


--- trunk/Source/WebCore/ChangeLog	2016-05-28 19:53:27 UTC (rev 201491)
+++ trunk/Source/WebCore/ChangeLog	2016-05-28 23:16:50 UTC (rev 201492)
@@ -1,3 +1,20 @@
+2016-05-28  Alexey Proskuryakov  <[email protected]>
+
+        Fix the build with newer clang and other custom configuration options
+        https://bugs.webkit.org/show_bug.cgi?id=158161
+
+        Reviewed by Dan Bernstein.
+
+        * platform/mac/WebVideoFullscreenInterfaceMac.mm:
+        (WebCore::WebVideoFullscreenInterfaceMac::rateChanged): Added UNUSED_PARAMs for the
+        case where this function is unimplemented.
+        (WebCore::WebVideoFullscreenInterfaceMac::setExternalPlayback): Added a non-additions
+        version of this function.
+        * platform/spi/cf/CFNetworkSPI.h: Silence nullability-completeness (and other) warnings.
+        I doubt that it's practical to get these right for every SDK version at this time. Added
+        functions for overriding HTTPS certicate behavior that we used to declare in .m files.
+        * platform/spi/mac/AVFoundationSPI.h: Define AVAssetCache conditionally.
+
 2016-05-28  Ryosuke Niwa  <[email protected]>
 
         Autocorrection makes it hard to type "doesn't" and to type @ in email addresses

Modified: trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm (201491 => 201492)


--- trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm	2016-05-28 19:53:27 UTC (rev 201491)
+++ trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm	2016-05-28 23:16:50 UTC (rev 201492)
@@ -111,6 +111,9 @@
 {
 #if USE(APPLE_INTERNAL_SDK)
     [videoFullscreenInterfaceObjC() updateIsPlaying:isPlaying newPlaybackRate:playbackRate];
+#else
+    UNUSED_PARAM(isPlaying);
+    UNUSED_PARAM(playbackRate);
 #endif
 }
 
@@ -172,6 +175,10 @@
     return false;
 }
 
+void WebVideoFullscreenInterfaceMac::setExternalPlayback(bool, ExternalPlaybackTargetType, String)
+{
+}
+
 bool supportsPictureInPicture()
 {
     return false;

Modified: trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h (201491 => 201492)


--- trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h	2016-05-28 19:53:27 UTC (rev 201491)
+++ trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h	2016-05-28 23:16:50 UTC (rev 201492)
@@ -23,6 +23,8 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#pragma clang system_header
+
 #ifndef CFNetworkSPI_h
 #define CFNetworkSPI_h
 
@@ -85,6 +87,8 @@
 
 #if defined(__OBJC__)
 @interface NSURLRequest ()
++ (NSArray *)allowsSpecificHTTPSCertificateForHost:(NSString *)host;
++ (void)setAllowsSpecificHTTPSCertificate:(NSArray *)allow forHost:(NSString *)host;
 - (void)_setProperty:(id)value forKey:(NSString *)key;
 @end
 

Modified: trunk/Source/WebCore/platform/spi/mac/AVFoundationSPI.h (201491 => 201492)


--- trunk/Source/WebCore/platform/spi/mac/AVFoundationSPI.h	2016-05-28 19:53:27 UTC (rev 201491)
+++ trunk/Source/WebCore/platform/spi/mac/AVFoundationSPI.h	2016-05-28 23:16:50 UTC (rev 201492)
@@ -58,8 +58,14 @@
 #if USE(APPLE_INTERNAL_SDK)
 #import <AVFoundation/AVAssetCache_Private.h>
 #else
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000)
+#import <AVFoundation/AVAssetCache.h>
+#else
+@interface AVAssetCache : NSObject
+@end
+#endif
 NS_ASSUME_NONNULL_BEGIN
-@interface AVAssetCache : NSObject
+@interface AVAssetCache ()
 + (AVAssetCache *)assetCacheWithURL:(NSURL *)URL;
 - (id)initWithURL:(NSURL *)URL;
 - (NSArray *)allKeys;

Modified: trunk/Source/WebKit2/ChangeLog (201491 => 201492)


--- trunk/Source/WebKit2/ChangeLog	2016-05-28 19:53:27 UTC (rev 201491)
+++ trunk/Source/WebKit2/ChangeLog	2016-05-28 23:16:50 UTC (rev 201492)
@@ -1,3 +1,16 @@
+2016-05-28  Alexey Proskuryakov  <[email protected]>
+
+        Fix the build with newer clang and other custom configuration options
+        https://bugs.webkit.org/show_bug.cgi?id=158161
+
+        Reviewed by Dan Bernstein.
+
+        * NetworkProcess/ios/NetworkProcessIOS.mm: -setAllowsSpecificHTTPSCertificate:forHost:
+        is now in CFNetworkSPI.h
+        * NetworkProcess/mac/NetworkProcessMac.mm: Ditto.
+        * Shared/mac/CookieStorageShimLibrary.cpp:
+        (WebKit::WebKitCookieStorageShimInitialize): Use more portable std::call_once.
+
 2016-05-28  Chris Dumez  <[email protected]>
 
         Modernize lambda captures in the network disk cache implementation

Modified: trunk/Source/WebKit2/NetworkProcess/ios/NetworkProcessIOS.mm (201491 => 201492)


--- trunk/Source/WebKit2/NetworkProcess/ios/NetworkProcessIOS.mm	2016-05-28 19:53:27 UTC (rev 201491)
+++ trunk/Source/WebKit2/NetworkProcess/ios/NetworkProcessIOS.mm	2016-05-28 23:16:50 UTC (rev 201492)
@@ -33,16 +33,13 @@
 #import "ResourceCachesToClear.h"
 #import "SandboxInitializationParameters.h"
 #import "SecItemShim.h"
+#import <WebCore/CFNetworkSPI.h>
 #import <WebCore/CertificateInfo.h>
 #import <WebCore/NotImplemented.h>
 #import <WebCore/WebCoreThreadSystemInterface.h>
 
 #define ENABLE_MANUAL_NETWORK_SANDBOXING 0
 
-@interface NSURLRequest (WKDetails)
-+ (void)setAllowsSpecificHTTPSCertificate:(NSArray *)certificateChain forHost:(NSString *)host;
-@end
-
 using namespace WebCore;
 
 namespace WebKit {

Modified: trunk/Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm (201491 => 201492)


--- trunk/Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm	2016-05-28 19:53:27 UTC (rev 201491)
+++ trunk/Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm	2016-05-28 23:16:50 UTC (rev 201492)
@@ -48,10 +48,6 @@
 
 using namespace WebCore;
 
-@interface NSURLRequest (Details) 
-+ (void)setAllowsSpecificHTTPSCertificate:(NSArray *)allow forHost:(NSString *)host;
-@end
-
 namespace WebKit {
 
 void NetworkProcess::initializeProcess(const ChildProcessInitializationParameters&)

Modified: trunk/Source/WebKit2/Shared/mac/CookieStorageShimLibrary.cpp (201491 => 201492)


--- trunk/Source/WebKit2/Shared/mac/CookieStorageShimLibrary.cpp	2016-05-28 19:53:27 UTC (rev 201491)
+++ trunk/Source/WebKit2/Shared/mac/CookieStorageShimLibrary.cpp	2016-05-28 23:16:50 UTC (rev 201492)
@@ -29,6 +29,7 @@
 #if !PLATFORM(IOS)
 
 #include <WebCore/DynamicLinkerInterposing.h>
+#include <mutex>
 
 extern "C" CFDictionaryRef _CFHTTPCookieStorageCopyRequestHeaderFieldsForURL(CFAllocatorRef inAllocator, CFHTTPCookieStorageRef inCookieStorage, CFURLRef inRequestURL);
 
@@ -80,12 +81,8 @@
 {
     // Because the value of cookieStorageShimCallbacks will be read from mulitple threads,
     // only allow it to be initialized once.
-    static int initialized = 0;
-    if (!OSAtomicCompareAndSwapInt(0, 1, &initialized)) {
-        return;
-    }
-
-    cookieStorageShimCallbacks = callbacks;
+    static std::once_flag initializeCallbacksOnceFlag;
+    std::call_once(initializeCallbacksOnceFlag, [&callbacks] { cookieStorageShimCallbacks = callbacks; });
 }
     
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to