Title: [200114] trunk/Source/_javascript_Core
- Revision
- 200114
- Author
- [email protected]
- Date
- 2016-04-26 17:30:18 -0700 (Tue, 26 Apr 2016)
Log Message
Update the compatibility version check for the ObjC API's InitConstructorSupport to use dyld_get_program_sdk_version().
https://bugs.webkit.org/show_bug.cgi?id=157048
Reviewed by Geoffrey Garen.
* API/JSWrapperMap.mm:
(supportsInitMethodConstructors):
(getJSExportProtocol):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/API/JSWrapperMap.mm (200113 => 200114)
--- trunk/Source/_javascript_Core/API/JSWrapperMap.mm 2016-04-26 23:26:19 UTC (rev 200113)
+++ trunk/Source/_javascript_Core/API/JSWrapperMap.mm 2016-04-27 00:30:18 UTC (rev 200114)
@@ -44,8 +44,17 @@
#include <mach-o/dyld.h>
-static const int32_t webkitFirstVersionWithInitConstructorSupport = 0x21A0400; // 538.4.0
+#if __has_include(<mach-o/dyld_priv.h>)
+#include <mach-o/dyld_priv.h>
+#endif
+extern "C" uint32_t dyld_get_program_sdk_version();
+#if PLATFORM(IOS)
+static const uint32_t webkitFirstSDKVersionWithInitConstructorSupport = 0x80000; // iOS 8.0.0
+#elif PLATFORM(MAC)
+static const uint32_t webkitFirstSDKVersionWithInitConstructorSupport = 0xA0A00; // OSX 10.10.0
+#endif
+
@class JSObjCClassInfo;
@interface JSWrapperMap ()
@@ -650,12 +659,12 @@
#if PLATFORM(APPLETV)
// There are no old clients on Apple TV, so there's no need for backwards compatibility.
return true;
+#else
+ static uint32_t programSDKVersion = 0;
+ if (!programSDKVersion)
+ programSDKVersion = dyld_get_program_sdk_version();
+ return programSDKVersion >= webkitFirstSDKVersionWithInitConstructorSupport;
#endif
-
- static int32_t versionOfLinkTimeLibrary = 0;
- if (!versionOfLinkTimeLibrary)
- versionOfLinkTimeLibrary = NSVersionOfLinkTimeLibrary("_javascript_Core");
- return versionOfLinkTimeLibrary >= webkitFirstVersionWithInitConstructorSupport;
}
Protocol *getJSExportProtocol()
Modified: trunk/Source/_javascript_Core/ChangeLog (200113 => 200114)
--- trunk/Source/_javascript_Core/ChangeLog 2016-04-26 23:26:19 UTC (rev 200113)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-04-27 00:30:18 UTC (rev 200114)
@@ -1,3 +1,14 @@
+2016-04-26 Mark Lam <[email protected]>
+
+ Update the compatibility version check for the ObjC API's InitConstructorSupport to use dyld_get_program_sdk_version().
+ https://bugs.webkit.org/show_bug.cgi?id=157048
+
+ Reviewed by Geoffrey Garen.
+
+ * API/JSWrapperMap.mm:
+ (supportsInitMethodConstructors):
+ (getJSExportProtocol):
+
2016-04-26 Benjamin Poulain <[email protected]>
[JSC] GetByVal on Undecided use its children before its OSR Exit
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes