Changeset 138957 in webkit
- Timestamp:
- Jan 7, 2013 10:31:20 AM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/tests/testapi.mm
r138956 r138957 26 26 #import "JavaScriptCore.h" 27 27 28 bool _Block_has_signature(void *);29 const char * _Block_signature(void *);28 extern "C" bool _Block_has_signature(void *); 29 extern "C" const char * _Block_signature(void *); 30 30 31 31 extern int failed; 32 void testObjectiveCAPI(void);32 extern "C" void testObjectiveCAPI(void); 33 33 34 34 #if JS_OBJC_API_ENABLED … … 125 125 static bool blockSignatureContainsClass() 126 126 { 127 static bool containsClass = (bool)^{127 static bool containsClass = ^{ 128 128 id block = ^(NSString *string){ return string; }; 129 129 return _Block_has_signature(block) && strstr(_Block_signature(block), "NSString"); 130 } ;130 }(); 131 131 return containsClass; 132 132 } -
trunk/Source/JavaScriptCore/ChangeLog
r138924 r138957 1 2013-01-07 Mark Hahnenberg <mhahnenberg@apple.com> 2 3 testapi is failing with a block-related error in the Objc API 4 https://bugs.webkit.org/show_bug.cgi?id=106055 5 6 Reviewed by Geoffrey Garen. 7 8 Casting a block to a bool will always return true, which isn't the behavior that is intended here. 9 Instead we need to call the block, but C semantics don't allow this, so we need to change 10 testapi.m to be Objective-C++ and therefore testapi.mm. 11 12 * API/tests/testapi.m: Removed. 13 * API/tests/testapi.mm: Copied from Source/JavaScriptCore/API/tests/testapi.m. 14 (blockSignatureContainsClass): 15 * JavaScriptCore.xcodeproj/project.pbxproj: 16 1 17 2013-01-06 Filip Pizlo <fpizlo@apple.com> 2 18 -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r138763 r138957 540 540 86CC85C40EE7A89400288682 /* JITPropertyAccess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86CC85C30EE7A89400288682 /* JITPropertyAccess.cpp */; }; 541 541 86CCEFDE0F413F8900FD7F9E /* JITCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 86CCEFDD0F413F8900FD7F9E /* JITCode.h */; settings = {ATTRIBUTES = (Private, ); }; }; 542 86D2221A167EF9440024C804 /* testapi.m in Sources */ = {isa = PBXBuildFile; fileRef = 86D22219167EF9440024C804 /* testapi.m */; };542 86D2221A167EF9440024C804 /* testapi.mm in Sources */ = {isa = PBXBuildFile; fileRef = 86D22219167EF9440024C804 /* testapi.mm */; }; 543 543 86D3B2C310156BDE002865E7 /* ARMAssembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86D3B2BF10156BDE002865E7 /* ARMAssembler.cpp */; }; 544 544 86D3B2C410156BDE002865E7 /* ARMAssembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86D3B2C010156BDE002865E7 /* ARMAssembler.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 1395 1395 86CC85C30EE7A89400288682 /* JITPropertyAccess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITPropertyAccess.cpp; sourceTree = "<group>"; }; 1396 1396 86CCEFDD0F413F8900FD7F9E /* JITCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITCode.h; sourceTree = "<group>"; }; 1397 86D22219167EF9440024C804 /* testapi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = testapi.m; path = API/tests/testapi.m; sourceTree = "<group>"; };1397 86D22219167EF9440024C804 /* testapi.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; name = testapi.mm; path = API/tests/testapi.mm; sourceTree = "<group>"; }; 1398 1398 86D3B2BF10156BDE002865E7 /* ARMAssembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMAssembler.cpp; sourceTree = "<group>"; }; 1399 1399 86D3B2C010156BDE002865E7 /* ARMAssembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMAssembler.h; sourceTree = "<group>"; }; … … 1913 1913 14BD5A2D0A3E91F600BAF59C /* testapi.c */, 1914 1914 14D857740A4696C80032146C /* testapi.js */, 1915 86D22219167EF9440024C804 /* testapi.m */,1915 86D22219167EF9440024C804 /* testapi.mm */, 1916 1916 651122E5140469BA002B101D /* testRegExp.cpp */, 1917 1917 ); … … 3590 3590 files = ( 3591 3591 1440F6100A4F85670005F061 /* testapi.c in Sources */, 3592 86D2221A167EF9440024C804 /* testapi.m in Sources */,3592 86D2221A167EF9440024C804 /* testapi.mm in Sources */, 3593 3593 ); 3594 3594 runOnlyForDeploymentPostprocessing = 0;
Note: See TracChangeset
for help on using the changeset viewer.