Changeset 267539 in webkit
- Timestamp:
- Sep 24, 2020, 11:28:36 AM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 12 edited
- 1 copied
-
ThirdParty/libwebrtc/ChangeLog (modified) (1 diff)
-
ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp (modified) (1 diff)
-
ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp (modified) (1 diff)
-
ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp (modified) (1 diff)
-
ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig (modified) (1 diff)
-
ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.h (modified) (1 diff)
-
ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.mm (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/SourcesCocoa.txt (modified) (1 diff)
-
WebCore/WebCore.xcodeproj/project.pbxproj (modified) (2 diffs)
-
WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp (modified) (3 diffs)
-
WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h (modified) (1 diff)
-
WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.mm (copied) (copied from trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/ThirdParty/libwebrtc/ChangeLog
r266810 r267539 1 2020-09-24 Youenn Fablet <youenn@apple.com> 2 3 Add libwebrtc.dylib version check 4 https://bugs.webkit.org/show_bug.cgi?id=216884 5 <rdar://problem/69441354> 6 7 Reviewed by Eric Carlson. 8 9 Introduce isMatchingBundleVersion to check libwebrtc.dylib version. 10 11 * Configurations/libwebrtc.iOS.exp: 12 * Configurations/libwebrtc.iOSsim.exp: 13 * Configurations/libwebrtc.mac.exp: 14 * Configurations/libwebrtc.xcconfig: 15 * Source/webrtc/sdk/WebKit/WebKitUtilities.h: 16 * Source/webrtc/sdk/WebKit/WebKitUtilities.mm: 17 (webrtc::isMatchingBundleVersion): 18 1 19 2020-09-09 David Kilzer <ddkilzer@apple.com> 2 20 -
trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp
r266698 r267539 329 329 __ZN7cricket27ICE_CANDIDATE_COMPONENT_RTPE 330 330 __ZNK3rtc13SocketAddress5IsNilEv 331 __ZN6webrtc23isMatchingBundleVersionEPKc -
trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp
r266698 r267539 329 329 __ZN7cricket27ICE_CANDIDATE_COMPONENT_RTPE 330 330 __ZNK3rtc13SocketAddress5IsNilEv 331 __ZN6webrtc23isMatchingBundleVersionEPKc -
trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp
r266698 r267539 327 327 __ZN7cricket27ICE_CANDIDATE_COMPONENT_RTPE 328 328 __ZNK3rtc13SocketAddress5IsNilEv 329 __ZN6webrtc23isMatchingBundleVersionEPKc -
trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig
r264492 r267539 27 27 28 28 // FIXME: Set WEBRTC_USE_BUILTIN_ISAC_FIX and WEBRTC_USE_BUILTIN_ISAC_FLOAT for iOS and Mac 29 GCC_PREPROCESSOR_DEFINITIONS = GTEST_RELATIVE_PATH WEBRTC_OPUS_SUPPORT_120MS_PTIME=0 WEBRTC_POSIX WEBRTC_MAC SSL_USE_OPENSSL FEATURE_ENABLE_SSL HAVE_SRTP HAVE_NETINET_IN_H HAVE_OPENSSL_SSL_H SCTP_PROCESS_LEVEL_LOCKS SCTP_SIMPLE_ALLOCATOR SCTP_USE_OPENSSL_SHA1 __Userspace__ HAVE_SA_LEN HAVE_SCONN_LEN __APPLE_USE_RFC_2292 __Userspace_os_Darwin NON_WINDOWS_DEFINE HAVE_WEBRTC_VIDEO HAVE_WEBRTC_VOICE WEBRTC_INTELLIGIBILITY_ENHANCER=0 WEBRTC_APM_DEBUG_DUMP=0 WEBRTC_NS_FLOAT WEBRTC_USE_BUILTIN_ILBC WEBRTC_CODEC_ILBC WEBRTC_USE_BUILTIN_OPUS WEBRTC_CODEC_OPUS WEBRTC_CODEC_ISAC WEBRTC_CODEC_RED HAVE_STDINT_H HAVE_STDLIB_H HAVE_UINT64_T OPENSSL HAVE_CONFIG_H WEBRTC_WEBKIT_BUILD HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE HAVE_SCTP WEBRTC_CODEC_G711 WEBRTC_CODEC_G722 WEBRTC_OPUS_VARIABLE_COMPLEXITY=0 WEBRTC_USE_BUILTIN_ISAC_FIX=1 WEBRTC_USE_BUILTIN_ISAC_FLOAT=0 USE_BUILTIN_SW_CODECS WEBRTC_WEBKIT_BUILD RTC_ENABLE_VP9 $(inherited);29 GCC_PREPROCESSOR_DEFINITIONS = GTEST_RELATIVE_PATH WEBRTC_OPUS_SUPPORT_120MS_PTIME=0 WEBRTC_POSIX WEBRTC_MAC SSL_USE_OPENSSL FEATURE_ENABLE_SSL HAVE_SRTP HAVE_NETINET_IN_H HAVE_OPENSSL_SSL_H SCTP_PROCESS_LEVEL_LOCKS SCTP_SIMPLE_ALLOCATOR SCTP_USE_OPENSSL_SHA1 __Userspace__ HAVE_SA_LEN HAVE_SCONN_LEN __APPLE_USE_RFC_2292 __Userspace_os_Darwin NON_WINDOWS_DEFINE HAVE_WEBRTC_VIDEO HAVE_WEBRTC_VOICE WEBRTC_INTELLIGIBILITY_ENHANCER=0 WEBRTC_APM_DEBUG_DUMP=0 WEBRTC_NS_FLOAT WEBRTC_USE_BUILTIN_ILBC WEBRTC_CODEC_ILBC WEBRTC_USE_BUILTIN_OPUS WEBRTC_CODEC_OPUS WEBRTC_CODEC_ISAC WEBRTC_CODEC_RED HAVE_STDINT_H HAVE_STDLIB_H HAVE_UINT64_T OPENSSL HAVE_CONFIG_H WEBRTC_WEBKIT_BUILD HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE HAVE_SCTP WEBRTC_CODEC_G711 WEBRTC_CODEC_G722 WEBRTC_OPUS_VARIABLE_COMPLEXITY=0 WEBRTC_USE_BUILTIN_ISAC_FIX=1 WEBRTC_USE_BUILTIN_ISAC_FLOAT=0 USE_BUILTIN_SW_CODECS WEBRTC_WEBKIT_BUILD RTC_ENABLE_VP9 BUNDLE_VERSION=\"$BUNDLE_VERSION\" $(inherited); 30 30 31 31 GCC_PREPROCESSOR_DEFINITIONS[sdk=macosx*] = $(inherited) WEBRTC_USE_VTB_HARDWARE_ENCODER; -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.h
r263931 r267539 60 60 CVPixelBufferPoolRef createPixelBufferPool(size_t width, size_t height); 61 61 62 bool isMatchingBundleVersion(const char*); 62 63 } -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.mm
r265073 r267539 245 245 } 246 246 247 } 247 bool isMatchingBundleVersion(const char *bundleVersion) 248 { 249 return !strcmp(bundleVersion, BUNDLE_VERSION); 250 } 251 252 } -
trunk/Source/WebCore/ChangeLog
r267537 r267539 1 2020-09-24 Youenn Fablet <youenn@apple.com> 2 3 Add libwebrtc.dylib version check 4 https://bugs.webkit.org/show_bug.cgi?id=216884 5 <rdar://problem/69441354> 6 7 Reviewed by Eric Carlson. 8 9 Use webrtc::isMatchingBundleVersion to check for libwebrtc.dylib presence and for version matching. 10 If version does not match, crash the web process. 11 No change of behavior. 12 13 * SourcesCocoa.txt: 14 * WebCore.xcodeproj/project.pbxproj: 15 * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp: 16 (WebCore::LibWebRTCProvider::webRTCAvailable): 17 * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h: 18 * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.mm: 19 1 20 2020-09-24 Chris Dumez <cdumez@apple.com> 2 21 -
trunk/Source/WebCore/SourcesCocoa.txt
r266977 r267539 527 527 platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm @no-unify 528 528 platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp 529 platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.mm 529 530 platform/mediastream/mac/AVCaptureDeviceManager.mm @no-unify 530 531 platform/mediastream/mac/AVVideoCaptureSource.mm @no-unify -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r267509 r267539 7593 7593 4176E89123C34B75003E83FE /* MediaRecorderProvider.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MediaRecorderProvider.cpp; sourceTree = "<group>"; }; 7594 7594 4177040B23F70CAB000C54EE /* MediaRecorderPrivate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaRecorderPrivate.cpp; sourceTree = "<group>"; }; 7595 4177D57B251CBE9500E8C66B /* LibWebRTCProviderCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = LibWebRTCProviderCocoa.mm; path = libwebrtc/LibWebRTCProviderCocoa.mm; sourceTree = "<group>"; }; 7595 7596 4177F51C2382544000C04486 /* BaseAudioSharedUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BaseAudioSharedUnit.cpp; sourceTree = "<group>"; }; 7596 7597 4177F51E2382545E00C04486 /* BaseAudioSharedUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseAudioSharedUnit.h; sourceTree = "<group>"; }; … … 18905 18906 41B28B381F860BD100FB52AC /* LibWebRTCProviderCocoa.cpp */, 18906 18907 41B28B361F860BD000FB52AC /* LibWebRTCProviderCocoa.h */, 18908 4177D57B251CBE9500E8C66B /* LibWebRTCProviderCocoa.mm */, 18907 18909 410E445F234373AD000173D4 /* LibWebRTCSocketIdentifier.h */, 18908 18910 ); -
trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp
r267249 r267539 38 38 #include <wtf/darwin/WeakLinking.h> 39 39 40 WTF_WEAK_LINK_FORCE_IMPORT(webrtc:: setApplicationStatus);40 WTF_WEAK_LINK_FORCE_IMPORT(webrtc::isMatchingBundleVersion); 41 41 42 42 namespace WebCore { … … 81 81 return true; 82 82 #else 83 return !!webrtc:: setApplicationStatus;83 return !!webrtc::isMatchingBundleVersion; 84 84 #endif 85 85 } … … 90 90 webrtc::registerWebKitVP9Decoder(); 91 91 } 92 92 93 } // namespace WebCore 93 94 -
trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h
r267249 r267539 39 39 class WEBCORE_EXPORT LibWebRTCProviderCocoa : public LibWebRTCProvider { 40 40 public: 41 LibWebRTCProviderCocoa() = default;41 LibWebRTCProviderCocoa(); 42 42 ~LibWebRTCProviderCocoa(); 43 43 -
trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.mm
r267538 r267539 1 1 /* 2 * Copyright (C) 20 17Apple Inc. All rights reserved.2 * Copyright (C) 2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #pragma once 27 28 #include "LibWebRTCProvider.h" 26 #include "config.h" 27 #include "LibWebRTCProviderCocoa.h" 29 28 30 29 #if USE(LIBWEBRTC) 31 30 32 namespace webrtc { 33 class VideoDecoderFactory; 34 class VideoEncoderFactory; 35 } 31 ALLOW_UNUSED_PARAMETERS_BEGIN 32 #include <webrtc/sdk/WebKit/WebKitUtilities.h> 33 ALLOW_UNUSED_PARAMETERS_END 36 34 37 35 namespace WebCore { 38 36 39 class WEBCORE_EXPORT LibWebRTCProviderCocoa : public LibWebRTCProvider { 40 public: 41 LibWebRTCProviderCocoa() = default;42 ~LibWebRTCProviderCocoa();37 LibWebRTCProviderCocoa::LibWebRTCProviderCocoa() 38 { 39 if (!webRTCAvailable()) 40 return; 43 41 44 std::unique_ptr<webrtc::VideoDecoderFactory> createDecoderFactory() override; 45 46 private: 47 void setActive(bool) final; 48 std::unique_ptr<webrtc::VideoEncoderFactory> createEncoderFactory() final; 49 }; 42 RELEASE_ASSERT_WITH_MESSAGE(webrtc::isMatchingBundleVersion([[NSBundle bundleWithIdentifier:@"com.apple.WebCore"].infoDictionary[(__bridge NSString *)kCFBundleVersionKey] UTF8String]), "WebCore and libwebrtc versions do not match"); 43 } 50 44 51 45 } // namespace WebCore 52 46 53 #endif 47 #endif // USE(LIBWEBRTC)
Note:
See TracChangeset
for help on using the changeset viewer.