WebKit Bugzilla
Attachment 361801 Details for
Bug 194529
: REGRESSION (r238955, r240494): Soft-linking optional Lookup.framework triggers release assertion when missing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch v4
bug-194529-20190212091533.patch (text/plain), 11.22 KB, created by
David Kilzer (:ddkilzer)
on 2019-02-12 09:15:34 PST
(
hide
)
Description:
Patch v4
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2019-02-12 09:15:34 PST
Size:
11.22 KB
patch
obsolete
>Subversion Revision: 241288 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index da5eece0d14cf1df21135d43f7d08485470f613b..6bcd453d797f89912b91f56e3cacbb3956a4dc4f 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,30 @@ >+2019-02-12 David Kilzer <ddkilzer@apple.com> >+ >+ REGRESSION (r238955, r240494): Soft-linking optional Lookup.framework triggers release assertion when missing >+ <https://webkit.org/b/194529> >+ <rdar://problem/47924449> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/cocoa/SoftLinking.h: >+ (SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT_AND_IS_OPTIONAL): Rename >+ SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT_AND_ASSERTION() to this >+ and change `assertion` argument to `isOptional`. Pass >+ `isOptional` to framework##Library() method to control assertion >+ behavior. Only check RELEASE_ASSERT() if `!isOptional`, else >+ that code should be optimized out by the compiler. This fixes >+ the crash. >+ (NO_ASSERT): Remove macro since it's no longer used. >+ (SOFT_LINK_IS_OPTIONAL): Add macro to use for soft-linking >+ optional classes. >+ (SOFT_LINK_IS_NOT_OPTIONAL): Add macro to use for soft-linking >+ non-optional classes. >+ (SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT): Update to use new >+ SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT_AND_IS_OPTIONAL() macro. >+ (SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT): Ditto. >+ (SOFT_LINK_CLASS_FOR_SOURCE): Ditto. >+ (SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL): Ditto. >+ > 2019-02-11 Myles C. Maxfield <mmaxfield@apple.com> > > [Cocoa] Ask platform for generic font family mappings >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 18ee72539d313a2c7d68ca5782b3dc550a3e6eef..1d647df5c0dfc8bc0a046eae8d5929c559a0088f 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,30 @@ >+2019-02-12 David Kilzer <ddkilzer@apple.com> >+ >+ REGRESSION (r238955, r240494): Soft-linking optional Lookup.framework triggers release assertion when missing >+ <https://webkit.org/b/194529> >+ <rdar://problem/47924449> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * SourcesCocoa.txt: >+ - Do not include DataDetectorsCoreSoftLink.mm in unified >+ sources. >+ * WebCore.xcodeproj/project.pbxproj: >+ - Add DataDetectorsCoreSoftLink.mm to the WebCore target now >+ that it isn't part of the unifed sources. >+ * platform/cocoa/DataDetectorsCoreSoftLink.mm: >+ - Switch from using SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL() to >+ SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE() when linking >+ DataDetectorsCore.framework. None of the other macros assume >+ this framework is optional, and it was likely made optional >+ originally because the framework was new to iOS and thus >+ didn't exist on older versions. >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: >+ - Change use of SOFT_LINK_CLASS_FOR_SOURCE() macros to >+ SOFT_LINK_CLASS() since the latter can only be used with >+ SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation). This broke after >+ the fix for <wtf/SoftLinking.h> was applied. >+ > 2019-02-11 Myles C. Maxfield <mmaxfield@apple.com> > > [Cocoa] Ask platform for generic font family mappings >diff --git a/Source/WTF/wtf/cocoa/SoftLinking.h b/Source/WTF/wtf/cocoa/SoftLinking.h >index c028cd3f665ec655ce5ca7861ddb575a8b8f9e14..e008322375a72933263b0bd4ecae6abfc78db539 100644 >--- a/Source/WTF/wtf/cocoa/SoftLinking.h >+++ b/Source/WTF/wtf/cocoa/SoftLinking.h >@@ -389,7 +389,7 @@ > } \ > } > >-#define SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT_AND_ASSERTION(functionNamespace, framework, className, export, assertion) \ >+#define SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT_AND_IS_OPTIONAL(functionNamespace, framework, className, export, isOptional) \ > @class className; \ > namespace functionNamespace { \ > static Class init##className(); \ >@@ -405,28 +405,30 @@ > { \ > static dispatch_once_t once; \ > dispatch_once(&once, ^{ \ >- framework##Library(); \ >+ framework##Library(isOptional); \ > class##className = objc_getClass(#className); \ >- assertion(class##className); \ >+ if (!isOptional) \ >+ RELEASE_ASSERT(class##className); \ > get##className##Class = className##Function; \ > }); \ > return class##className; \ > } \ > } > >-#define NO_ASSERT(assertion) (void(0)) >+#define SOFT_LINK_IS_OPTIONAL true >+#define SOFT_LINK_IS_NOT_OPTIONAL false > > #define SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(functionNamespace, framework, className, export) \ >- SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT_AND_ASSERTION(functionNamespace, framework, className, export, RELEASE_ASSERT) >+ SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT_AND_IS_OPTIONAL(functionNamespace, framework, className, export, SOFT_LINK_IS_NOT_OPTIONAL) > > #define SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(functionNamespace, framework, className, export) \ >- SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT_AND_ASSERTION(functionNamespace, framework, className, export, NO_ASSERT) >+ SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT_AND_IS_OPTIONAL(functionNamespace, framework, className, export, SOFT_LINK_IS_OPTIONAL) > > #define SOFT_LINK_CLASS_FOR_SOURCE(functionNamespace, framework, className) \ >- SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT_AND_ASSERTION(functionNamespace, framework, className, , RELEASE_ASSERT) >+ SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT_AND_IS_OPTIONAL(functionNamespace, framework, className, , SOFT_LINK_IS_NOT_OPTIONAL) > > #define SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL(functionNamespace, framework, className) \ >- SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT_AND_ASSERTION(functionNamespace, framework, className, , NO_ASSERT) >+ SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT_AND_IS_OPTIONAL(functionNamespace, framework, className, , SOFT_LINK_IS_OPTIONAL) > > #define SOFT_LINK_CONSTANT_FOR_HEADER(functionNamespace, framework, variableName, variableType) \ > namespace functionNamespace { \ >diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt >index de38abfac66059e7773793a388ee4083ef9e9a7c..91496dace59d7e13b940bc973f43a64c0f2e5a8c 100644 >--- a/Source/WebCore/SourcesCocoa.txt >+++ b/Source/WebCore/SourcesCocoa.txt >@@ -189,7 +189,7 @@ platform/cf/SharedBufferCF.cpp > > platform/cocoa/ContentFilterUnblockHandlerCocoa.mm @no-unify > platform/cocoa/CoreVideoSoftLink.cpp >-platform/cocoa/DataDetectorsCoreSoftLink.mm >+platform/cocoa/DataDetectorsCoreSoftLink.mm @no-unify > platform/cocoa/FileMonitorCocoa.mm > platform/cocoa/KeyEventCocoa.mm > platform/cocoa/LocalizedStringsCocoa.mm >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 0273cbbabf40606b43b16487110be5b2f56ab477..ac2e22471d89dd8a1fd105db43deebb531ade78e 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -1233,6 +1233,7 @@ > 43EDD67F1B485DBF00640E75 /* CombinedFiltersAlphabet.h in Headers */ = {isa = PBXBuildFile; fileRef = 43EDD67D1B485DBF00640E75 /* CombinedFiltersAlphabet.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 4415292E0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4415292C0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 445775E520472F73008DCE5D /* LocalDefaultSystemAppearance.h in Headers */ = {isa = PBXBuildFile; fileRef = 445775E420472F73008DCE5D /* LocalDefaultSystemAppearance.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 4463CF682212FA68001A8577 /* DataDetectorsCoreSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C7941E21C56C29300A4C58E /* DataDetectorsCoreSoftLink.mm */; }; > 4471710E205AF945000A116E /* MediaQueryParserContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4471710C205AF945000A116E /* MediaQueryParserContext.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 447958041643B49A001E0A7F /* ParsedContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 447958031643B47B001E0A7F /* ParsedContentType.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 448A29BF0A46D9CB0030759F /* JSHTMLOptionsCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 448A29BD0A46D9CB0030759F /* JSHTMLOptionsCollection.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -32921,6 +32922,7 @@ > 46C696CC1E7205FC00597937 /* CPUMonitor.cpp in Sources */, > 1ABA76CA11D20E50004C201C /* CSSPropertyNames.cpp in Sources */, > BE23480C18A9870B00E4B6E8 /* DataCue.cpp in Sources */, >+ 4463CF682212FA68001A8577 /* DataDetectorsCoreSoftLink.mm in Sources */, > E58B45BB20AD07DD00991025 /* DataListButtonElement.cpp in Sources */, > 515BE18F1D54F5FB00DD7C68 /* EmptyGamepadProvider.cpp in Sources */, > 724ED32C1A3A7E5400F5F13C /* EXTBlendMinMax.cpp in Sources */, >diff --git a/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.mm b/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.mm >index f40ebcd394a5a36388797a5cb1b4840024c165cd..893e38cfc14dc5954976aa895f088cff994a3ef0 100644 >--- a/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.mm >+++ b/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.mm >@@ -28,7 +28,7 @@ > > #if PLATFORM(IOS_FAMILY) && ENABLE(DATA_DETECTION) > >-SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(DataDetectorsCore) >+SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE(WebCore, DataDetectorsCore) > > SOFT_LINK_CLASS_FOR_SOURCE(WebCore, DataDetectorsCore, DDScannerResult) > SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, DataDetectorsCore, DDScannerCreate, DDScannerRef, (DDScannerType type, DDScannerOptions options, CFErrorRef * errorRef), (type, options, errorRef)) >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >index fd484d7340edf80fe56f2b0c05c27a66ed5620ca..770f637e11fc2365bb7ccb3e737ea2b5dfe25f5a 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >@@ -154,14 +154,14 @@ SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation) > > SOFT_LINK_FRAMEWORK_OPTIONAL(CoreImage) > >-SOFT_LINK_CLASS_FOR_SOURCE(WebCore, AVFoundation, AVPlayer) >-SOFT_LINK_CLASS_FOR_SOURCE(WebCore, AVFoundation, AVPlayerItem) >-SOFT_LINK_CLASS_FOR_SOURCE(WebCore, AVFoundation, AVPlayerItemVideoOutput) >-SOFT_LINK_CLASS_FOR_SOURCE(WebCore, AVFoundation, AVPlayerLayer) >-SOFT_LINK_CLASS_FOR_SOURCE(WebCore, AVFoundation, AVURLAsset) >-SOFT_LINK_CLASS_FOR_SOURCE(WebCore, AVFoundation, AVAssetImageGenerator) >-SOFT_LINK_CLASS_FOR_SOURCE(WebCore, AVFoundation, AVMetadataItem) >-SOFT_LINK_CLASS_FOR_SOURCE(WebCore, AVFoundation, AVAssetCache) >+SOFT_LINK_CLASS(AVFoundation, AVPlayer) >+SOFT_LINK_CLASS(AVFoundation, AVPlayerItem) >+SOFT_LINK_CLASS(AVFoundation, AVPlayerItemVideoOutput) >+SOFT_LINK_CLASS(AVFoundation, AVPlayerLayer) >+SOFT_LINK_CLASS(AVFoundation, AVURLAsset) >+SOFT_LINK_CLASS(AVFoundation, AVAssetImageGenerator) >+SOFT_LINK_CLASS(AVFoundation, AVMetadataItem) >+SOFT_LINK_CLASS(AVFoundation, AVAssetCache) > > SOFT_LINK_CLASS(CoreImage, CIContext) > SOFT_LINK_CLASS(CoreImage, CIImage)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194529
:
361767
|
361771
|
361790
| 361801