Changeset 221723 in webkit for trunk/Source/JavaScriptCore/API/JSValue.mm
- Timestamp:
- Sep 7, 2017, 1:14:30 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSValue.mm
r211247 r221723 1055 1055 char idType[3]; 1056 1056 // Check 2nd argument type is "@" 1057 char* secondType = method_copyArgumentType(method, 3);1058 if (strcmp(secondType, "@") != 0) {1059 free(secondType);1060 return;1057 { 1058 auto secondType = adoptSystem<char[]>(method_copyArgumentType(method, 3)); 1059 if (strcmp(secondType.get(), "@") != 0) 1060 return; 1061 1061 } 1062 free(secondType);1063 1062 // Check result type is also "@" 1064 1063 method_getReturnType(method, idType, 3); 1065 1064 if (strcmp(idType, "@") != 0) 1066 1065 return; 1067 char* type = method_copyArgumentType(method, 2); 1068 structHandlers->add(StringImpl::create(type), (StructTagHandler){ selector, 0 }); 1069 free(type); 1066 { 1067 auto type = adoptSystem<char[]>(method_copyArgumentType(method, 2)); 1068 structHandlers->add(StringImpl::create(type.get()), (StructTagHandler) { selector, 0 }); 1069 } 1070 1070 }); 1071 1071 … … 1082 1082 return; 1083 1083 // Try to find a matching valueWith<Foo>:context: method. 1084 char* type = method_copyReturnType(method); 1085 1086 StructHandlers::iterator iter = structHandlers->find(type); 1087 free(type); 1084 auto type = adoptSystem<char[]>(method_copyReturnType(method)); 1085 StructHandlers::iterator iter = structHandlers->find(type.get()); 1088 1086 if (iter == structHandlers->end()) 1089 1087 return;
Note:
See TracChangeset
for help on using the changeset viewer.