Changeset 225243 in webkit
- Timestamp:
- Nov 28, 2017, 3:34:07 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r225239 r225243 1 2017-11-28 Brian Burg <bburg@apple.com> 2 3 [Cocoa] Clean up names of conversion methods after renaming InspectorValue to JSON::Value 4 https://bugs.webkit.org/show_bug.cgi?id=179696 5 6 Reviewed by Timothy Hatcher. 7 8 * inspector/scripts/codegen/generate_objc_header.py: 9 (ObjCHeaderGenerator._generate_type_interface): 10 * inspector/scripts/codegen/generate_objc_protocol_types_implementation.py: 11 (ObjCProtocolTypesImplementationGenerator.generate_type_implementation): 12 (ObjCProtocolTypesImplementationGenerator._generate_init_method_for_protocol_object): 13 (ObjCProtocolTypesImplementationGenerator._generate_init_method_for_json_object): Deleted. 14 * inspector/scripts/codegen/objc_generator.py: 15 (ObjCGenerator.protocol_type_for_raw_name): 16 (ObjCGenerator.objc_protocol_export_expression_for_variable): 17 (ObjCGenerator.objc_protocol_export_expression_for_variable.is): 18 (ObjCGenerator.objc_protocol_import_expression_for_variable): 19 (ObjCGenerator.objc_protocol_import_expression_for_variable.is): 20 (ObjCGenerator.objc_to_protocol_expression_for_member.is): 21 (ObjCGenerator.objc_to_protocol_expression_for_member): 22 (ObjCGenerator.protocol_to_objc_expression_for_member.is): 23 (ObjCGenerator.protocol_to_objc_expression_for_member): 24 (ObjCGenerator.protocol_to_objc_code_block_for_object_member): 25 (ObjCGenerator.objc_setter_method_for_member_internal): 26 (ObjCGenerator.objc_getter_method_for_member_internal): 27 * inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result: 28 * inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result: 29 * inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result: 30 * inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result: 31 * inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result: 32 * inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result: 33 * inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result: 34 * inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result: 35 * inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result: 36 * inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result: 37 1 38 2017-11-27 JF Bastien <jfbastien@apple.com> 2 39 -
trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py
r212116 r225243 167 167 lines.append('@interface %s : %sJSONObject' % (objc_name, ObjCGenerator.OBJC_STATIC_PREFIX)) 168 168 169 # The initializers that take a payload or inspectorobject are only needed by the frontend.169 # The initializers that take a payload or protocol object are only needed by the frontend. 170 170 if self.get_generator_setting('generate_frontend', False): 171 171 lines.append('- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;') 172 lines.append('- (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;')172 lines.append('- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;') 173 173 174 174 required_members = filter(lambda member: not member.is_optional, declaration.type_members) -
trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py
r225231 r225243 95 95 lines.append('') 96 96 lines.append(self._generate_init_method_for_payload(domain, declaration)) 97 lines.append(self._generate_init_method_for_ json_object(domain, declaration))97 lines.append(self._generate_init_method_for_protocol_object(domain, declaration)) 98 98 required_members = filter(lambda member: not member.is_optional, declaration.type_members) 99 99 if required_members: … … 109 109 return '\n'.join(lines) 110 110 111 def _generate_init_method_for_ json_object(self, domain, declaration):112 lines = [] 113 lines.append('- (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject')114 lines.append('{') 115 lines.append(' if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))')111 def _generate_init_method_for_protocol_object(self, domain, declaration): 112 lines = [] 113 lines.append('- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object') 114 lines.append('{') 115 lines.append(' if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))') 116 116 lines.append(' return nil;') 117 117 lines.append('') -
trunk/Source/JavaScriptCore/inspector/scripts/codegen/objc_generator.py
r215698 r225243 248 248 return 'bool' 249 249 if raw_name in ['any', 'object']: 250 return ' InspectorObject'250 return 'JSON::Object' 251 251 return None 252 252 … … 372 372 return var_name 373 373 if category is ObjCTypeCategory.Object: 374 return '[%s to InspectorObject]' % var_name374 return '[%s toJSONObject]' % var_name 375 375 if category is ObjCTypeCategory.Array: 376 376 protocol_type = ObjCGenerator.protocol_type_for_type(var_type.element_type) 377 377 objc_class = self.objc_class_for_type(var_type.element_type) 378 378 if protocol_type == 'Inspector::Protocol::Array<String>': 379 return ' inspectorStringArrayArray(%s)' % var_name379 return 'toJSONStringArrayArray(%s)' % var_name 380 380 if protocol_type is 'String' and objc_class is 'NSString': 381 return ' inspectorStringArray(%s)' % var_name381 return 'toJSONStringArray(%s)' % var_name 382 382 if protocol_type is 'int' and objc_class is 'NSNumber': 383 return ' inspectorIntegerArray(%s)' % var_name383 return 'toJSONIntegerArray(%s)' % var_name 384 384 if protocol_type is 'double' and objc_class is 'NSNumber': 385 return ' inspectorDoubleArray(%s)' % var_name386 return ' inspectorObjectArray(%s)' % var_name385 return 'toJSONDoubleArray(%s)' % var_name 386 return 'toJSONObjectArray(%s)' % var_name 387 387 388 388 def objc_protocol_import_expression_for_member(self, name, declaration, member): … … 406 406 if category is ObjCTypeCategory.Object: 407 407 objc_class = self.objc_class_for_type(var_type) 408 return '[[[%s alloc] initWith InspectorObject:%s] autorelease]' % (objc_class, var_name)408 return '[[[%s alloc] initWithJSONObject:%s] autorelease]' % (objc_class, var_name) 409 409 if category is ObjCTypeCategory.Array: 410 410 objc_class = self.objc_class_for_type(var_type.element_type) 411 411 if objc_class is 'NSString': 412 return ' objcStringArray(%s)' % var_name412 return 'toObjCStringArray(%s)' % var_name 413 413 if objc_class is 'NSNumber': # FIXME: Integer or Double? 414 return ' objcIntegerArray(%s)' % var_name415 return ' objcArray<%s>(%s)' % (objc_class, var_name)414 return 'toObjCIntegerArray(%s)' % var_name 415 return 'toObjCArray<%s>(%s)' % (objc_class, var_name) 416 416 417 417 # ObjC <-> JSON object conversion for types getters/setters. … … 430 430 objc_class = self.objc_class_for_type(member.type.element_type) 431 431 if objc_class is 'NSString': 432 return ' inspectorStringArray(%s)' % sub_expression432 return 'toJSONStringArray(%s)' % sub_expression 433 433 if objc_class is 'NSNumber': 434 434 protocol_type = ObjCGenerator.protocol_type_for_type(member.type.element_type) 435 435 if protocol_type is 'double': 436 return ' inspectorDoubleArray(%s)' % sub_expression437 return ' inspectorIntegerArray(%s)' % sub_expression438 return ' inspectorObjectArray(%s)' % sub_expression436 return 'toJSONDoubleArray(%s)' % sub_expression 437 return 'toJSONIntegerArray(%s)' % sub_expression 438 return 'toJSONObjectArray(%s)' % sub_expression 439 439 440 440 def protocol_to_objc_expression_for_member(self, declaration, member, sub_expression): … … 452 452 objc_class = self.objc_class_for_type(member.type.element_type) 453 453 if objc_class is 'NSString': 454 return ' objcStringArray(%s)' % sub_expression454 return 'toObjCStringArray(%s)' % sub_expression 455 455 if objc_class is 'NSNumber': 456 456 protocol_type = ObjCGenerator.protocol_type_for_type(member.type.element_type) 457 457 if protocol_type is 'double': 458 return ' objcDoubleArray(%s)' % sub_expression459 return ' objcIntegerArray(%s)' % sub_expression460 return ' objcArray<%s>(%s)' % (objc_class, sub_expression)458 return 'toObjCDoubleArray(%s)' % sub_expression 459 return 'toObjCIntegerArray(%s)' % sub_expression 460 return 'toObjCArray<%s>(%s)' % (objc_class, sub_expression) 461 461 462 462 def protocol_to_objc_code_block_for_object_member(self, declaration, member, sub_expression): … … 466 466 lines.append(' if (!object)') 467 467 lines.append(' return nil;') 468 lines.append(' return [[%s alloc] initWith InspectorObject:[%s toInspectorObject].get()];' % (objc_class, sub_expression))468 lines.append(' return [[%s alloc] initWithJSONObject:[%s toJSONObject].get()];' % (objc_class, sub_expression)) 469 469 return '\n'.join(lines) 470 470 … … 529 529 return 'setObject' 530 530 if raw_name is 'array': 531 return 'set InspectorArray'531 return 'setJSONArray' 532 532 return None 533 533 if (isinstance(_type, EnumType)): … … 536 536 return 'setObject' 537 537 if (isinstance(_type, ArrayType)): 538 return 'set InspectorArray'538 return 'setJSONArray' 539 539 return None 540 540 … … 560 560 return 'objectForKey' 561 561 if raw_name is 'array': 562 return ' inspectorArrayForKey'562 return 'JSONArrayForKey' 563 563 return None 564 564 if (isinstance(_type, EnumType)): … … 567 567 return 'objectForKey' 568 568 if (isinstance(_type, ArrayType)): 569 return ' inspectorArrayForKey'570 return None 569 return 'JSONArrayForKey' 570 return None -
trunk/Source/JavaScriptCore/inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result
r225231 r225243 908 908 @interface TestProtocolNetworkError : RWIProtocolJSONObject 909 909 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 910 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;910 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 911 911 - (instancetype)initWithMessage:(NSString *)message code:(int)code; 912 912 /* required */ @property (nonatomic, copy) NSString *message; … … 1157 1157 return self; 1158 1158 } 1159 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject1160 { 1161 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))1159 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 1160 { 1161 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 1162 1162 return nil; 1163 1163 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result
r225231 r225243 931 931 THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors"); 932 932 if (columnNames) 933 resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(*columnNames));933 resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(*columnNames)); 934 934 if (notes) 935 935 resultObject->setString(ASCIILiteral("notes"), *notes); … … 937 937 resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp); 938 938 if (values) 939 resultObject->setObject(ASCIILiteral("values"), [*values to InspectorObject]);939 resultObject->setObject(ASCIILiteral("values"), [*values toJSONObject]); 940 940 if (payload) 941 resultObject->setValue(ASCIILiteral("payload"), [*payload to InspectorObject]);941 resultObject->setValue(ASCIILiteral("payload"), [*payload toJSONObject]); 942 942 if (databaseId) 943 943 resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId); 944 944 if (sqlError) 945 resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError to InspectorObject]);945 resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toJSONObject]); 946 946 if (screenColor) 947 947 resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor)); 948 948 if (alternateColors) 949 resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(*alternateColors));949 resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(*alternateColors)); 950 950 if (printColor) 951 951 resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor)); … … 975 975 THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors"); 976 976 if (columnNames) 977 resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(*columnNames));977 resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(*columnNames)); 978 978 if (notes) 979 979 resultObject->setString(ASCIILiteral("notes"), *notes); … … 981 981 resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp); 982 982 if (values) 983 resultObject->setObject(ASCIILiteral("values"), [*values to InspectorObject]);983 resultObject->setObject(ASCIILiteral("values"), [*values toJSONObject]); 984 984 if (payload) 985 resultObject->setValue(ASCIILiteral("payload"), [*payload to InspectorObject]);985 resultObject->setValue(ASCIILiteral("payload"), [*payload toJSONObject]); 986 986 if (databaseId) 987 987 resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId); 988 988 if (sqlError) 989 resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError to InspectorObject]);989 resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toJSONObject]); 990 990 if (screenColor) 991 991 resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor)); 992 992 if (alternateColors) 993 resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(*alternateColors));993 resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(*alternateColors)); 994 994 if (printColor) 995 995 resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor)); … … 1018 1018 THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError"); 1019 1019 THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors"); 1020 resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));1020 resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames)); 1021 1021 resultObject->setString(ASCIILiteral("notes"), notes); 1022 1022 resultObject->setDouble(ASCIILiteral("timestamp"), timestamp); 1023 resultObject->setObject(ASCIILiteral("values"), [values to InspectorObject]);1024 resultObject->setValue(ASCIILiteral("payload"), [payload to InspectorObject]);1023 resultObject->setObject(ASCIILiteral("values"), [values toJSONObject]); 1024 resultObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]); 1025 1025 resultObject->setInteger(ASCIILiteral("databaseId"), databaseId); 1026 resultObject->setObject(ASCIILiteral("sqlError"), [sqlError to InspectorObject]);1027 resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));1026 resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]); 1027 resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors)); 1028 1028 resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor)); 1029 1029 resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor)); … … 1052 1052 THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError"); 1053 1053 THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors"); 1054 resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));1054 resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames)); 1055 1055 resultObject->setString(ASCIILiteral("notes"), notes); 1056 1056 resultObject->setDouble(ASCIILiteral("timestamp"), timestamp); 1057 resultObject->setObject(ASCIILiteral("values"), [values to InspectorObject]);1058 resultObject->setValue(ASCIILiteral("payload"), [payload to InspectorObject]);1057 resultObject->setObject(ASCIILiteral("values"), [values toJSONObject]); 1058 resultObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]); 1059 1059 resultObject->setInteger(ASCIILiteral("databaseId"), databaseId); 1060 resultObject->setObject(ASCIILiteral("sqlError"), [sqlError to InspectorObject]);1060 resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]); 1061 1061 resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor)); 1062 resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));1062 resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors)); 1063 1063 resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor)); 1064 1064 backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false); … … 1329 1329 @interface TestProtocolDatabaseError : RWIProtocolJSONObject 1330 1330 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 1331 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;1331 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 1332 1332 - (instancetype)initWithMessage:(NSString *)message code:(int)code; 1333 1333 /* required */ @property (nonatomic, copy) NSString *message; … … 1734 1734 return self; 1735 1735 } 1736 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject1737 { 1738 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))1736 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 1737 { 1738 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 1739 1739 return nil; 1740 1740 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result
r225231 r225243 830 830 THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors"); 831 831 if (columnNames) 832 resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(*columnNames));832 resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(*columnNames)); 833 833 if (notes) 834 834 resultObject->setString(ASCIILiteral("notes"), *notes); … … 836 836 resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp); 837 837 if (values) 838 resultObject->setObject(ASCIILiteral("values"), [*values to InspectorObject]);838 resultObject->setObject(ASCIILiteral("values"), [*values toJSONObject]); 839 839 if (payload) 840 resultObject->setValue(ASCIILiteral("payload"), [*payload to InspectorObject]);840 resultObject->setValue(ASCIILiteral("payload"), [*payload toJSONObject]); 841 841 if (databaseId) 842 842 resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId); 843 843 if (sqlError) 844 resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError to InspectorObject]);844 resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toJSONObject]); 845 845 if (screenColor) 846 846 resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor)); 847 847 if (alternateColors) 848 resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(*alternateColors));848 resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(*alternateColors)); 849 849 if (printColor) 850 850 resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor)); … … 854 854 NSArray/*<NSString>*/ *o_in_columnNames; 855 855 if (in_columnNames) 856 o_in_columnNames = objcStringArray(in_columnNames);856 o_in_columnNames = toObjCStringArray(in_columnNames); 857 857 NSString *o_in_notes; 858 858 if (in_notes) … … 863 863 RWIProtocolJSONObject *o_in_values; 864 864 if (in_values) 865 o_in_values = [[[RWIProtocolJSONObject alloc] initWith InspectorObject:in_values] autorelease];865 o_in_values = [[[RWIProtocolJSONObject alloc] initWithJSONObject:in_values] autorelease]; 866 866 RWIProtocolJSONObject *o_in_payload; 867 867 if (in_payload) 868 o_in_payload = [[[RWIProtocolJSONObject alloc] initWith InspectorObject:in_payload] autorelease];868 o_in_payload = [[[RWIProtocolJSONObject alloc] initWithJSONObject:in_payload] autorelease]; 869 869 int o_in_databaseId; 870 870 if (in_databaseId) … … 872 872 TestProtocolDatabaseError *o_in_sqlError; 873 873 if (in_sqlError) 874 o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWith InspectorObject:in_sqlError] autorelease];874 o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithJSONObject:in_sqlError] autorelease]; 875 875 std::optional<TestProtocolDatabasePrimaryColors> o_in_screenColor; 876 876 if (in_screenColor) … … 878 878 NSArray/*<NSString>*/ *o_in_alternateColors; 879 879 if (in_alternateColors) 880 o_in_alternateColors = objcStringArray(in_alternateColors);880 o_in_alternateColors = toObjCStringArray(in_alternateColors); 881 881 std::optional<TestProtocolDatabaseExecuteAllOptionalParametersPrintColor> o_in_printColor; 882 882 if (in_printColor) … … 901 901 THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError"); 902 902 THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors"); 903 resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));903 resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames)); 904 904 resultObject->setString(ASCIILiteral("notes"), notes); 905 905 resultObject->setDouble(ASCIILiteral("timestamp"), timestamp); 906 resultObject->setObject(ASCIILiteral("values"), [values to InspectorObject]);907 resultObject->setValue(ASCIILiteral("payload"), [payload to InspectorObject]);906 resultObject->setObject(ASCIILiteral("values"), [values toJSONObject]); 907 resultObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]); 908 908 resultObject->setInteger(ASCIILiteral("databaseId"), databaseId); 909 resultObject->setObject(ASCIILiteral("sqlError"), [sqlError to InspectorObject]);909 resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]); 910 910 resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor)); 911 resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));911 resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors)); 912 912 resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor)); 913 913 backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false); 914 914 }; 915 915 916 NSArray/*<NSString>*/ *o_in_columnNames = objcStringArray(&in_columnNames);916 NSArray/*<NSString>*/ *o_in_columnNames = toObjCStringArray(&in_columnNames); 917 917 NSString *o_in_notes = in_notes; 918 918 double o_in_timestamp = in_timestamp; 919 RWIProtocolJSONObject *o_in_values = [[[RWIProtocolJSONObject alloc] initWith InspectorObject:&in_values] autorelease];920 RWIProtocolJSONObject *o_in_payload = [[[RWIProtocolJSONObject alloc] initWith InspectorObject:&in_payload] autorelease];919 RWIProtocolJSONObject *o_in_values = [[[RWIProtocolJSONObject alloc] initWithJSONObject:&in_values] autorelease]; 920 RWIProtocolJSONObject *o_in_payload = [[[RWIProtocolJSONObject alloc] initWithJSONObject:&in_payload] autorelease]; 921 921 int o_in_databaseId = in_databaseId; 922 TestProtocolDatabaseError *o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWith InspectorObject:&in_sqlError] autorelease];922 TestProtocolDatabaseError *o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithJSONObject:&in_sqlError] autorelease]; 923 923 std::optional<TestProtocolDatabasePrimaryColors> o_in_screenColor = fromProtocolString<TestProtocolDatabasePrimaryColors>(in_screenColor); 924 924 if (!o_in_screenColor) { … … 926 926 return; 927 927 } 928 NSArray/*<NSString>*/ *o_in_alternateColors = objcStringArray(&in_alternateColors);928 NSArray/*<NSString>*/ *o_in_alternateColors = toObjCStringArray(&in_alternateColors); 929 929 std::optional<TestProtocolDatabaseExecuteNoOptionalParametersPrintColor> o_in_printColor = fromProtocolString<TestProtocolDatabaseExecuteNoOptionalParametersPrintColor>(in_printColor); 930 930 if (!o_in_printColor) { … … 1194 1194 @interface TestProtocolDatabaseError : RWIProtocolJSONObject 1195 1195 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 1196 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;1196 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 1197 1197 - (instancetype)initWithMessage:(NSString *)message code:(int)code; 1198 1198 /* required */ @property (nonatomic, copy) NSString *message; … … 1597 1597 return self; 1598 1598 } 1599 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject1600 { 1601 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))1599 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 1600 { 1601 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 1602 1602 return nil; 1603 1603 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result
r225231 r225243 790 790 Ref<JSON::Object> paramsObject = JSON::Object::create(); 791 791 if (columnNames) 792 paramsObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray((*columnNames)));792 paramsObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray((*columnNames))); 793 793 if (notes) 794 794 paramsObject->setString(ASCIILiteral("notes"), (*notes)); … … 796 796 paramsObject->setDouble(ASCIILiteral("timestamp"), (*timestamp)); 797 797 if (values) 798 paramsObject->setObject(ASCIILiteral("values"), [(*values) to InspectorObject]);798 paramsObject->setObject(ASCIILiteral("values"), [(*values) toJSONObject]); 799 799 if (payload) 800 paramsObject->setValue(ASCIILiteral("payload"), [(*payload) to InspectorObject]);800 paramsObject->setValue(ASCIILiteral("payload"), [(*payload) toJSONObject]); 801 801 if (sqlError) 802 paramsObject->setObject(ASCIILiteral("sqlError"), [(*sqlError) to InspectorObject]);802 paramsObject->setObject(ASCIILiteral("sqlError"), [(*sqlError) toJSONObject]); 803 803 if (screenColor) 804 804 paramsObject->setString(ASCIILiteral("screenColor"), (*screenColor)); 805 805 if (alternateColors) 806 paramsObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray((*alternateColors)));806 paramsObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray((*alternateColors))); 807 807 if (printColor) 808 808 paramsObject->setString(ASCIILiteral("printColor"), (*printColor)); … … 827 827 jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteNoOptionalParameters")); 828 828 Ref<JSON::Object> paramsObject = JSON::Object::create(); 829 paramsObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));829 paramsObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames)); 830 830 paramsObject->setString(ASCIILiteral("notes"), notes); 831 831 paramsObject->setDouble(ASCIILiteral("timestamp"), timestamp); 832 paramsObject->setObject(ASCIILiteral("values"), [values to InspectorObject]);833 paramsObject->setValue(ASCIILiteral("payload"), [payload to InspectorObject]);834 paramsObject->setObject(ASCIILiteral("sqlError"), [sqlError to InspectorObject]);832 paramsObject->setObject(ASCIILiteral("values"), [values toJSONObject]); 833 paramsObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]); 834 paramsObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]); 835 835 paramsObject->setString(ASCIILiteral("screenColor"), screenColor); 836 paramsObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));836 paramsObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors)); 837 837 paramsObject->setString(ASCIILiteral("printColor"), printColor); 838 838 jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject)); … … 896 896 @interface TestProtocolDatabaseError : RWIProtocolJSONObject 897 897 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 898 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;898 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 899 899 - (instancetype)initWithMessage:(NSString *)message code:(int)code; 900 900 /* required */ @property (nonatomic, copy) NSString *message; … … 1164 1164 return self; 1165 1165 } 1166 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject1167 { 1168 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))1166 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 1167 { 1168 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 1169 1169 return nil; 1170 1170 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result
r225231 r225243 935 935 @interface TestProtocolNetwork2NetworkError : RWIProtocolJSONObject 936 936 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 937 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;937 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 938 938 - (instancetype)initWithMessage:(NSString *)message code:(int)code; 939 939 /* required */ @property (nonatomic, copy) NSString *message; … … 1184 1184 return self; 1185 1185 } 1186 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject1187 { 1188 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))1186 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 1187 { 1188 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 1189 1189 return nil; 1190 1190 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result
r225231 r225243 798 798 @interface TestProtocolRuntimeKeyPath : RWIProtocolJSONObject 799 799 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 800 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;800 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 801 801 - (instancetype)initWithType:(TestProtocolRuntimeKeyPathType)type; 802 802 /* required */ @property (nonatomic, assign) TestProtocolRuntimeKeyPathType type; … … 1066 1066 return self; 1067 1067 } 1068 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject1069 { 1070 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))1068 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 1069 { 1070 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 1071 1071 return nil; 1072 1072 … … 1106 1106 - (void)setArray:(NSArray/*<NSString>*/ *)array 1107 1107 { 1108 [super set InspectorArray:inspectorStringArray(array) forKey:@"array"];1108 [super setJSONArray:toJSONStringArray(array) forKey:@"array"]; 1109 1109 } 1110 1110 1111 1111 - (NSArray/*<NSString>*/ *)array 1112 1112 { 1113 return objcStringArray([super inspectorArrayForKey:@"array"]);1113 return toObjCStringArray([super JSONArrayForKey:@"array"]); 1114 1114 } 1115 1115 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result
r225231 r225243 1340 1340 @interface TestProtocolDatabaseError : RWIProtocolJSONObject 1341 1341 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 1342 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;1342 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 1343 1343 - (instancetype)initWithMessage:(NSString *)message code:(int)code; 1344 1344 /* required */ @property (nonatomic, copy) NSString *message; … … 1349 1349 @interface TestProtocolDatabaseOptionalParameterBundle : RWIProtocolJSONObject 1350 1350 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 1351 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;1351 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 1352 1352 /* optional */ @property (nonatomic, copy) NSArray/*<NSString>*/ *columnNames; 1353 1353 /* optional */ @property (nonatomic, copy) NSArray/*<NSString>*/ *buttons; … … 1364 1364 @interface TestProtocolDatabaseParameterBundle : RWIProtocolJSONObject 1365 1365 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 1366 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;1366 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 1367 1367 - (instancetype)initWithColumnNames:(NSArray/*<NSString>*/ *)columnNames buttons:(NSArray/*<NSString>*/ *)buttons directionality:(TestProtocolDatabaseParameterBundleDirectionality)directionality notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload error:(TestProtocolDatabaseError *)error errorList:(NSArray/*<TestProtocolDatabaseError>*/ *)errorList; 1368 1368 /* required */ @property (nonatomic, copy) NSArray/*<NSString>*/ *columnNames; … … 1380 1380 @interface TestProtocolDatabaseObjectWithPropertyNameConflicts : RWIProtocolJSONObject 1381 1381 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 1382 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;1382 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 1383 1383 - (instancetype)initWithInteger:(NSString *)integer array:(NSString *)array string:(NSString *)string value:(NSString *)value object:(NSString *)object; 1384 1384 /* required */ @property (nonatomic, copy) NSString *integer; … … 1392 1392 @interface TestProtocolDatabaseDummyObject : RWIProtocolJSONObject 1393 1393 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 1394 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;1394 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 1395 1395 @end 1396 1396 … … 1398 1398 @interface TestProtocolTestParameterBundle : RWIProtocolJSONObject 1399 1399 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 1400 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;1400 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 1401 1401 - (instancetype)initWithDirectionality:(TestProtocolTestParameterBundleDirectionality)directionality buttons:(NSArray/*<NSString>*/ *)buttons columnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload error:(TestProtocolDatabaseError *)error; 1402 1402 /* required */ @property (nonatomic, assign) TestProtocolTestParameterBundleDirectionality directionality; … … 1791 1791 return self; 1792 1792 } 1793 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject1794 { 1795 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))1793 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 1794 { 1795 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 1796 1796 return nil; 1797 1797 … … 1863 1863 return self; 1864 1864 } 1865 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject1866 { 1867 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))1865 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 1866 { 1867 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 1868 1868 return nil; 1869 1869 … … 1873 1873 - (void)setColumnNames:(NSArray/*<NSString>*/ *)columnNames 1874 1874 { 1875 [super set InspectorArray:inspectorStringArray(columnNames) forKey:@"columnNames"];1875 [super setJSONArray:toJSONStringArray(columnNames) forKey:@"columnNames"]; 1876 1876 } 1877 1877 1878 1878 - (NSArray/*<NSString>*/ *)columnNames 1879 1879 { 1880 return objcStringArray([super inspectorArrayForKey:@"columnNames"]);1880 return toObjCStringArray([super JSONArrayForKey:@"columnNames"]); 1881 1881 } 1882 1882 1883 1883 - (void)setButtons:(NSArray/*<NSString>*/ *)buttons 1884 1884 { 1885 [super set InspectorArray:inspectorStringArray(buttons) forKey:@"buttons"];1885 [super setJSONArray:toJSONStringArray(buttons) forKey:@"buttons"]; 1886 1886 } 1887 1887 1888 1888 - (NSArray/*<NSString>*/ *)buttons 1889 1889 { 1890 return objcStringArray([super inspectorArrayForKey:@"buttons"]);1890 return toObjCStringArray([super JSONArrayForKey:@"buttons"]); 1891 1891 } 1892 1892 … … 1931 1931 if (!object) 1932 1932 return nil; 1933 return [[RWIProtocolJSONObject alloc] initWith InspectorObject:[[super objectForKey:@"values"] toInspectorObject].get()];1933 return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"values"] toJSONObject].get()]; 1934 1934 } 1935 1935 … … 1944 1944 if (!object) 1945 1945 return nil; 1946 return [[RWIProtocolJSONObject alloc] initWith InspectorObject:[[super objectForKey:@"payload"] toInspectorObject].get()];1946 return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"payload"] toJSONObject].get()]; 1947 1947 } 1948 1948 … … 1957 1957 if (!object) 1958 1958 return nil; 1959 return [[TestProtocolDatabaseError alloc] initWith InspectorObject:[[super objectForKey:@"error"] toInspectorObject].get()];1959 return [[TestProtocolDatabaseError alloc] initWithJSONObject:[[super objectForKey:@"error"] toJSONObject].get()]; 1960 1960 } 1961 1961 … … 1963 1963 { 1964 1964 THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(errorList, [TestProtocolDatabaseError class]); 1965 [super set InspectorArray:inspectorObjectArray(errorList) forKey:@"errorList"];1965 [super setJSONArray:toJSONObjectArray(errorList) forKey:@"errorList"]; 1966 1966 } 1967 1967 1968 1968 - (NSArray/*<TestProtocolDatabaseError>*/ *)errorList 1969 1969 { 1970 return objcArray<TestProtocolDatabaseError>([super inspectorArrayForKey:@"errorList"]);1970 return toObjCArray<TestProtocolDatabaseError>([super JSONArrayForKey:@"errorList"]); 1971 1971 } 1972 1972 … … 2011 2011 return self; 2012 2012 } 2013 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject2014 { 2015 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))2013 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 2014 { 2015 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 2016 2016 return nil; 2017 2017 … … 2048 2048 - (void)setColumnNames:(NSArray/*<NSString>*/ *)columnNames 2049 2049 { 2050 [super set InspectorArray:inspectorStringArray(columnNames) forKey:@"columnNames"];2050 [super setJSONArray:toJSONStringArray(columnNames) forKey:@"columnNames"]; 2051 2051 } 2052 2052 2053 2053 - (NSArray/*<NSString>*/ *)columnNames 2054 2054 { 2055 return objcStringArray([super inspectorArrayForKey:@"columnNames"]);2055 return toObjCStringArray([super JSONArrayForKey:@"columnNames"]); 2056 2056 } 2057 2057 2058 2058 - (void)setButtons:(NSArray/*<NSString>*/ *)buttons 2059 2059 { 2060 [super set InspectorArray:inspectorStringArray(buttons) forKey:@"buttons"];2060 [super setJSONArray:toJSONStringArray(buttons) forKey:@"buttons"]; 2061 2061 } 2062 2062 2063 2063 - (NSArray/*<NSString>*/ *)buttons 2064 2064 { 2065 return objcStringArray([super inspectorArrayForKey:@"buttons"]);2065 return toObjCStringArray([super JSONArrayForKey:@"buttons"]); 2066 2066 } 2067 2067 … … 2106 2106 if (!object) 2107 2107 return nil; 2108 return [[RWIProtocolJSONObject alloc] initWith InspectorObject:[[super objectForKey:@"values"] toInspectorObject].get()];2108 return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"values"] toJSONObject].get()]; 2109 2109 } 2110 2110 … … 2119 2119 if (!object) 2120 2120 return nil; 2121 return [[RWIProtocolJSONObject alloc] initWith InspectorObject:[[super objectForKey:@"payload"] toInspectorObject].get()];2121 return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"payload"] toJSONObject].get()]; 2122 2122 } 2123 2123 … … 2132 2132 if (!object) 2133 2133 return nil; 2134 return [[TestProtocolDatabaseError alloc] initWith InspectorObject:[[super objectForKey:@"error"] toInspectorObject].get()];2134 return [[TestProtocolDatabaseError alloc] initWithJSONObject:[[super objectForKey:@"error"] toJSONObject].get()]; 2135 2135 } 2136 2136 … … 2138 2138 { 2139 2139 THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(errorList, [TestProtocolDatabaseError class]); 2140 [super set InspectorArray:inspectorObjectArray(errorList) forKey:@"errorList"];2140 [super setJSONArray:toJSONObjectArray(errorList) forKey:@"errorList"]; 2141 2141 } 2142 2142 2143 2143 - (NSArray/*<TestProtocolDatabaseError>*/ *)errorList 2144 2144 { 2145 return objcArray<TestProtocolDatabaseError>([super inspectorArrayForKey:@"errorList"]);2145 return toObjCArray<TestProtocolDatabaseError>([super JSONArrayForKey:@"errorList"]); 2146 2146 } 2147 2147 … … 2172 2172 return self; 2173 2173 } 2174 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject2175 { 2176 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))2174 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 2175 { 2176 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 2177 2177 return nil; 2178 2178 … … 2261 2261 return self; 2262 2262 } 2263 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject2264 { 2265 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))2263 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 2264 { 2265 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 2266 2266 return nil; 2267 2267 … … 2307 2307 return self; 2308 2308 } 2309 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject2310 { 2311 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))2309 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 2310 { 2311 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 2312 2312 return nil; 2313 2313 … … 2351 2351 - (void)setButtons:(NSArray/*<NSString>*/ *)buttons 2352 2352 { 2353 [super set InspectorArray:inspectorStringArray(buttons) forKey:@"buttons"];2353 [super setJSONArray:toJSONStringArray(buttons) forKey:@"buttons"]; 2354 2354 } 2355 2355 2356 2356 - (NSArray/*<NSString>*/ *)buttons 2357 2357 { 2358 return objcStringArray([super inspectorArrayForKey:@"buttons"]);2358 return toObjCStringArray([super JSONArrayForKey:@"buttons"]); 2359 2359 } 2360 2360 2361 2361 - (void)setColumnNames:(NSArray/*<NSString>*/ *)columnNames 2362 2362 { 2363 [super set InspectorArray:inspectorStringArray(columnNames) forKey:@"columnNames"];2363 [super setJSONArray:toJSONStringArray(columnNames) forKey:@"columnNames"]; 2364 2364 } 2365 2365 2366 2366 - (NSArray/*<NSString>*/ *)columnNames 2367 2367 { 2368 return objcStringArray([super inspectorArrayForKey:@"columnNames"]);2368 return toObjCStringArray([super JSONArrayForKey:@"columnNames"]); 2369 2369 } 2370 2370 … … 2399 2399 if (!object) 2400 2400 return nil; 2401 return [[RWIProtocolJSONObject alloc] initWith InspectorObject:[[super objectForKey:@"values"] toInspectorObject].get()];2401 return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"values"] toJSONObject].get()]; 2402 2402 } 2403 2403 … … 2412 2412 if (!object) 2413 2413 return nil; 2414 return [[RWIProtocolJSONObject alloc] initWith InspectorObject:[[super objectForKey:@"payload"] toInspectorObject].get()];2414 return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"payload"] toJSONObject].get()]; 2415 2415 } 2416 2416 … … 2425 2425 if (!object) 2426 2426 return nil; 2427 return [[TestProtocolDatabaseError alloc] initWith InspectorObject:[[super objectForKey:@"error"] toInspectorObject].get()];2427 return [[TestProtocolDatabaseError alloc] initWithJSONObject:[[super objectForKey:@"error"] toJSONObject].get()]; 2428 2428 } 2429 2429 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result
r225231 r225243 1106 1106 @interface TestProtocolTestTypeNeedingCast : RWIProtocolJSONObject 1107 1107 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 1108 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;1108 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 1109 1109 - (instancetype)initWithString:(NSString *)string number:(int)number animals:(TestProtocolTestCastedAnimals)animals identifier:(int)identifier tree:(TestProtocolTestRecursiveObject1 *)tree; 1110 1110 /* required */ @property (nonatomic, copy) NSString *string; … … 1118 1118 @interface TestProtocolTestRecursiveObject1 : RWIProtocolJSONObject 1119 1119 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 1120 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;1120 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 1121 1121 /* optional */ @property (nonatomic, retain) TestProtocolTestRecursiveObject2 *obj; 1122 1122 @end … … 1125 1125 @interface TestProtocolTestRecursiveObject2 : RWIProtocolJSONObject 1126 1126 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 1127 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;1127 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 1128 1128 /* optional */ @property (nonatomic, retain) TestProtocolTestRecursiveObject1 *obj; 1129 1129 @end … … 1476 1476 return self; 1477 1477 } 1478 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject1479 { 1480 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))1478 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 1479 { 1480 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 1481 1481 return nil; 1482 1482 … … 1551 1551 if (!object) 1552 1552 return nil; 1553 return [[TestProtocolTestRecursiveObject1 alloc] initWith InspectorObject:[[super objectForKey:@"tree"] toInspectorObject].get()];1553 return [[TestProtocolTestRecursiveObject1 alloc] initWithJSONObject:[[super objectForKey:@"tree"] toJSONObject].get()]; 1554 1554 } 1555 1555 … … 1567 1567 return self; 1568 1568 } 1569 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject1570 { 1571 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))1569 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 1570 { 1571 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 1572 1572 return nil; 1573 1573 … … 1585 1585 if (!object) 1586 1586 return nil; 1587 return [[TestProtocolTestRecursiveObject2 alloc] initWith InspectorObject:[[super objectForKey:@"obj"] toInspectorObject].get()];1587 return [[TestProtocolTestRecursiveObject2 alloc] initWithJSONObject:[[super objectForKey:@"obj"] toJSONObject].get()]; 1588 1588 } 1589 1589 … … 1601 1601 return self; 1602 1602 } 1603 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject1604 { 1605 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))1603 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 1604 { 1605 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 1606 1606 return nil; 1607 1607 … … 1619 1619 if (!object) 1620 1620 return nil; 1621 return [[TestProtocolTestRecursiveObject1 alloc] initWith InspectorObject:[[super objectForKey:@"obj"] toInspectorObject].get()];1621 return [[TestProtocolTestRecursiveObject1 alloc] initWithJSONObject:[[super objectForKey:@"obj"] toJSONObject].get()]; 1622 1622 } 1623 1623 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result
r225231 r225243 801 801 @interface TestProtocolTestNoOpenParameters : RWIProtocolJSONObject 802 802 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 803 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;803 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 804 804 - (instancetype)initWithOne:(double)one two:(double)two; 805 805 /* required */ @property (nonatomic, assign) double one; … … 810 810 @interface TestProtocolTestOpenParameters : RWIProtocolJSONObject 811 811 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 812 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;812 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 813 813 - (instancetype)initWithAlpha:(double)alpha beta:(double)beta; 814 814 /* required */ @property (nonatomic, assign) double alpha; … … 1058 1058 return self; 1059 1059 } 1060 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject1061 { 1062 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))1060 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 1061 { 1062 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 1063 1063 return nil; 1064 1064 … … 1114 1114 return self; 1115 1115 } 1116 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject1117 { 1118 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))1116 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 1117 { 1118 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 1119 1119 return nil; 1120 1120 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result
r225231 r225243 908 908 @interface TestProtocolNetworkError : RWIProtocolJSONObject 909 909 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload; 910 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject;910 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; 911 911 - (instancetype)initWithMessage:(NSString *)message code:(int)code; 912 912 /* required */ @property (nonatomic, copy) NSString *message; … … 1157 1157 return self; 1158 1158 } 1159 - (instancetype)initWith JSONObject:(RWIProtocolJSONObject *)jsonObject1160 { 1161 if (!(self = [super initWith InspectorObject:[jsonObject toInspectorObject].get()]))1159 - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object 1160 { 1161 if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) 1162 1162 return nil; 1163 1163
Note:
See TracChangeset
for help on using the changeset viewer.