Title: [160970] trunk/Source/WebCore
- Revision
- 160970
- Author
- [email protected]
- Date
- 2013-12-21 17:04:16 -0800 (Sat, 21 Dec 2013)
Log Message
[Mac] Soft-link WebContentAnalysis.framework
https://bugs.webkit.org/show_bug.cgi?id=126102
Reviewed by Dan Bernstein.
* Configurations/WebCore.xcconfig: There's no need to modify LDFLAGS
now that we don't hard link against WebContentAnalysis.framework.
* WebCore.xcodeproj/project.pbxproj: Removed
WebContentAnalysis.framework from the 'Link Binary with Libraries'
build phase.
* platform/mac/ContentFilterMac.mm: Soft-linked
WebContentAnalysis.framework and the WebFilterEvaluator @class.
(WebCore::ContentFilter::ContentFilter): Called getWebFilterEvaluatorClass().
(WebCore::ContentFilter::isEnabled): Ditto.
* platform/mac/SoftLinking.h: Added an implementation of
SOFT_LINK_PRIVATE_FRAMEWORK().
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (160969 => 160970)
--- trunk/Source/WebCore/ChangeLog 2013-12-22 00:57:06 UTC (rev 160969)
+++ trunk/Source/WebCore/ChangeLog 2013-12-22 01:04:16 UTC (rev 160970)
@@ -1,3 +1,22 @@
+2013-12-20 Andy Estes <[email protected]>
+
+ [Mac] Soft-link WebContentAnalysis.framework
+ https://bugs.webkit.org/show_bug.cgi?id=126102
+
+ Reviewed by Dan Bernstein.
+
+ * Configurations/WebCore.xcconfig: There's no need to modify LDFLAGS
+ now that we don't hard link against WebContentAnalysis.framework.
+ * WebCore.xcodeproj/project.pbxproj: Removed
+ WebContentAnalysis.framework from the 'Link Binary with Libraries'
+ build phase.
+ * platform/mac/ContentFilterMac.mm: Soft-linked
+ WebContentAnalysis.framework and the WebFilterEvaluator @class.
+ (WebCore::ContentFilter::ContentFilter): Called getWebFilterEvaluatorClass().
+ (WebCore::ContentFilter::isEnabled): Ditto.
+ * platform/mac/SoftLinking.h: Added an implementation of
+ SOFT_LINK_PRIVATE_FRAMEWORK().
+
2013-12-21 Antti Koivisto <[email protected]>
Unreviewed, rolling out r160916.
Modified: trunk/Source/WebCore/Configurations/WebCore.xcconfig (160969 => 160970)
--- trunk/Source/WebCore/Configurations/WebCore.xcconfig 2013-12-22 00:57:06 UTC (rev 160969)
+++ trunk/Source/WebCore/Configurations/WebCore.xcconfig 2013-12-22 01:04:16 UTC (rev 160970)
@@ -66,7 +66,7 @@
INSTALLHDRS_COPY_PHASE = YES;
INSTALLHDRS_SCRIPT_PHASE = YES;
PRODUCT_NAME = WebCore;
-OTHER_LDFLAGS_BASE = -lsqlite3 -lobjc -lANGLE -allowable_client WebCoreTestSupport -F$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
+OTHER_LDFLAGS_BASE = -lsqlite3 -lobjc -lANGLE -allowable_client WebCoreTestSupport;
OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(PLATFORM_NAME));
OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_BASE) -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework GraphicsServices -framework ImageIO -framework QuartzCore;
OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (160969 => 160970)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2013-12-22 00:57:06 UTC (rev 160969)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2013-12-22 01:04:16 UTC (rev 160970)
@@ -3477,7 +3477,6 @@
A12538D413F9B60A00024754 /* LayoutRepainter.h in Headers */ = {isa = PBXBuildFile; fileRef = A120ACA013F9983700FE4AC7 /* LayoutRepainter.h */; settings = {ATTRIBUTES = (Private, ); }; };
A12705C31656BD6500C2E27C /* GridPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = A12705C21656BD6500C2E27C /* GridPosition.h */; settings = {ATTRIBUTES = (Private, ); }; };
A12A1050166444FD008FA311 /* GridTrackSize.h in Headers */ = {isa = PBXBuildFile; fileRef = A12A104E166444DC008FA311 /* GridTrackSize.h */; settings = {ATTRIBUTES = (Private, ); }; };
- A13330C01863C0BB00F9152B /* WebContentAnalysis.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A13330BE1863B92600F9152B /* WebContentAnalysis.framework */; };
A136A00C1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A136A00A1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp */; };
A136A00D1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.h in Headers */ = {isa = PBXBuildFile; fileRef = A136A00B1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.h */; };
A17C81220F2A5CF7005DAAEB /* HTMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */; };
@@ -10321,7 +10320,6 @@
A120ACA113F9984600FE4AC7 /* LayoutRepainter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutRepainter.cpp; sourceTree = "<group>"; };
A12705C21656BD6500C2E27C /* GridPosition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GridPosition.h; path = style/GridPosition.h; sourceTree = "<group>"; };
A12A104E166444DC008FA311 /* GridTrackSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GridTrackSize.h; path = style/GridTrackSize.h; sourceTree = "<group>"; };
- A13330BE1863B92600F9152B /* WebContentAnalysis.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebContentAnalysis.framework; path = System/Library/PrivateFrameworks/WebContentAnalysis.framework; sourceTree = SDKROOT; };
A136A00A1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLHttpRequestProgressEventThrottle.cpp; sourceTree = "<group>"; };
A136A00B1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLHttpRequestProgressEventThrottle.h; sourceTree = "<group>"; };
A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLElementFactory.cpp; sourceTree = "<group>"; };
@@ -13657,7 +13655,6 @@
49C7BA791042EFAE0009D447 /* OpenGL.framework in Frameworks */,
A88AD52F09524B92001DD196 /* QuartzCore.framework in Frameworks */,
1A7FA7CC0DDA4B770028F8A5 /* SystemConfiguration.framework in Frameworks */,
- A13330C01863C0BB00F9152B /* WebContentAnalysis.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -14065,7 +14062,6 @@
A85D7A2F0879EBA9006A9172 /* QuartzCore.framework */,
5FE1D291178FD1F3001AA3C3 /* Security.framework */,
1A7FA7CB0DDA4B770028F8A5 /* SystemConfiguration.framework */,
- A13330BE1863B92600F9152B /* WebContentAnalysis.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Modified: trunk/Source/WebCore/platform/mac/ContentFilterMac.mm (160969 => 160970)
--- trunk/Source/WebCore/platform/mac/ContentFilterMac.mm 2013-12-22 00:57:06 UTC (rev 160969)
+++ trunk/Source/WebCore/platform/mac/ContentFilterMac.mm 2013-12-22 01:04:16 UTC (rev 160970)
@@ -29,6 +29,8 @@
#if USE(CONTENT_FILTERING)
#import "ResourceResponse.h"
+#import "SoftLinking.h"
+#import <objc/runtime.h>
#if defined(__has_include) && __has_include(<WebContentAnalysis/WebFilterEvaluator.h>)
#import <WebContentAnalysis/WebFilterEvaluator.h>
@@ -44,6 +46,9 @@
@end
#endif
+SOFT_LINK_PRIVATE_FRAMEWORK(WebContentAnalysis);
+SOFT_LINK_CLASS(WebContentAnalysis, WebFilterEvaluator);
+
namespace WebCore {
PassRefPtr<ContentFilter> ContentFilter::create(const ResourceResponse& response)
@@ -52,14 +57,14 @@
}
ContentFilter::ContentFilter(const ResourceResponse& response)
- : m_platformContentFilter(adoptNS([[WebFilterEvaluator alloc] initWithResponse:response.nsURLResponse()]))
+ : m_platformContentFilter(adoptNS([[getWebFilterEvaluatorClass() alloc] initWithResponse:response.nsURLResponse()]))
{
ASSERT(m_platformContentFilter);
}
bool ContentFilter::isEnabled()
{
- return [WebFilterEvaluator isManagedSession];
+ return [getWebFilterEvaluatorClass() isManagedSession];
}
void ContentFilter::addData(const char* data, int length)
Modified: trunk/Source/WebCore/platform/mac/SoftLinking.h (160969 => 160970)
--- trunk/Source/WebCore/platform/mac/SoftLinking.h 2013-12-22 00:57:06 UTC (rev 160969)
+++ trunk/Source/WebCore/platform/mac/SoftLinking.h 2013-12-22 01:04:16 UTC (rev 160970)
@@ -45,6 +45,16 @@
return frameworkLibrary; \
}
+#define SOFT_LINK_PRIVATE_FRAMEWORK(framework) \
+ static void* framework##Library() \
+ { \
+ static void* frameworkLibrary = 0; \
+ if (!frameworkLibrary) \
+ frameworkLibrary = dlopen("/System/Library/PrivateFrameworks/" #framework ".framework/" #framework, RTLD_NOW); \
+ ASSERT_WITH_MESSAGE(frameworkLibrary, "%s", dlerror()); \
+ return frameworkLibrary; \
+ }
+
#define SOFT_LINK_FRAMEWORK_OPTIONAL(framework) \
static void* framework##Library() \
{ \
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes