Changeset 225243 in webkit


Ignore:
Timestamp:
Nov 28, 2017, 3:34:07 PM (7 years ago)
Author:
BJ Burg
Message:

2017-11-28 Brian Burg <BJ Burg>

[Cocoa] Clean up names of conversion methods after renaming InspectorValue to JSON::Value
https://bugs.webkit.org/show_bug.cgi?id=179696

Reviewed by Timothy Hatcher.

  • inspector/scripts/codegen/generate_objc_header.py:

(ObjCHeaderGenerator._generate_type_interface):

  • inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:

(ObjCProtocolTypesImplementationGenerator.generate_type_implementation):
(ObjCProtocolTypesImplementationGenerator._generate_init_method_for_protocol_object):
(ObjCProtocolTypesImplementationGenerator._generate_init_method_for_json_object): Deleted.

  • inspector/scripts/codegen/objc_generator.py:

(ObjCGenerator.protocol_type_for_raw_name):
(ObjCGenerator.objc_protocol_export_expression_for_variable):
(ObjCGenerator.objc_protocol_export_expression_for_variable.is):
(ObjCGenerator.objc_protocol_import_expression_for_variable):
(ObjCGenerator.objc_protocol_import_expression_for_variable.is):
(ObjCGenerator.objc_to_protocol_expression_for_member.is):
(ObjCGenerator.objc_to_protocol_expression_for_member):
(ObjCGenerator.protocol_to_objc_expression_for_member.is):
(ObjCGenerator.protocol_to_objc_expression_for_member):
(ObjCGenerator.protocol_to_objc_code_block_for_object_member):
(ObjCGenerator.objc_setter_method_for_member_internal):
(ObjCGenerator.objc_getter_method_for_member_internal):

  • inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
  • inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
  • inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
  • inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
  • inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
  • inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result:
  • inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:
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
    1382017-11-27  JF Bastien  <jfbastien@apple.com>
    239
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py

    r212116 r225243  
    167167        lines.append('@interface %s : %sJSONObject' % (objc_name, ObjCGenerator.OBJC_STATIC_PREFIX))
    168168
    169         # The initializers that take a payload or inspector object are only needed by the frontend.
     169        # The initializers that take a payload or protocol object are only needed by the frontend.
    170170        if self.get_generator_setting('generate_frontend', False):
    171171            lines.append('- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;')
    172             lines.append('- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;')
     172            lines.append('- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;')
    173173
    174174        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  
    9595            lines.append('')
    9696            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))
    9898        required_members = filter(lambda member: not member.is_optional, declaration.type_members)
    9999        if required_members:
     
    109109        return '\n'.join(lines)
    110110
    111     def _generate_init_method_for_json_object(self, domain, declaration):
    112         lines = []
    113         lines.append('- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject')
    114         lines.append('{')
    115         lines.append('    if (!(self = [super initWithInspectorObject:[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()]))')
    116116        lines.append('        return nil;')
    117117        lines.append('')
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/objc_generator.py

    r215698 r225243  
    248248            return 'bool'
    249249        if raw_name in ['any', 'object']:
    250             return 'InspectorObject'
     250            return 'JSON::Object'
    251251        return None
    252252
     
    372372            return var_name
    373373        if category is ObjCTypeCategory.Object:
    374             return '[%s toInspectorObject]' % var_name
     374            return '[%s toJSONObject]' % var_name
    375375        if category is ObjCTypeCategory.Array:
    376376            protocol_type = ObjCGenerator.protocol_type_for_type(var_type.element_type)
    377377            objc_class = self.objc_class_for_type(var_type.element_type)
    378378            if protocol_type == 'Inspector::Protocol::Array<String>':
    379                 return 'inspectorStringArrayArray(%s)' % var_name
     379                return 'toJSONStringArrayArray(%s)' % var_name
    380380            if protocol_type is 'String' and objc_class is 'NSString':
    381                 return 'inspectorStringArray(%s)' % var_name
     381                return 'toJSONStringArray(%s)' % var_name
    382382            if protocol_type is 'int' and objc_class is 'NSNumber':
    383                 return 'inspectorIntegerArray(%s)' % var_name
     383                return 'toJSONIntegerArray(%s)' % var_name
    384384            if protocol_type is 'double' and objc_class is 'NSNumber':
    385                 return 'inspectorDoubleArray(%s)' % var_name
    386             return 'inspectorObjectArray(%s)' % var_name
     385                return 'toJSONDoubleArray(%s)' % var_name
     386            return 'toJSONObjectArray(%s)' % var_name
    387387
    388388    def objc_protocol_import_expression_for_member(self, name, declaration, member):
     
    406406        if category is ObjCTypeCategory.Object:
    407407            objc_class = self.objc_class_for_type(var_type)
    408             return '[[[%s alloc] initWithInspectorObject:%s] autorelease]' % (objc_class, var_name)
     408            return '[[[%s alloc] initWithJSONObject:%s] autorelease]' % (objc_class, var_name)
    409409        if category is ObjCTypeCategory.Array:
    410410            objc_class = self.objc_class_for_type(var_type.element_type)
    411411            if objc_class is 'NSString':
    412                 return 'objcStringArray(%s)' % var_name
     412                return 'toObjCStringArray(%s)' % var_name
    413413            if objc_class is 'NSNumber':  # FIXME: Integer or Double?
    414                 return 'objcIntegerArray(%s)' % var_name
    415             return 'objcArray<%s>(%s)' % (objc_class, var_name)
     414                return 'toObjCIntegerArray(%s)' % var_name
     415            return 'toObjCArray<%s>(%s)' % (objc_class, var_name)
    416416
    417417    # ObjC <-> JSON object conversion for types getters/setters.
     
    430430            objc_class = self.objc_class_for_type(member.type.element_type)
    431431            if objc_class is 'NSString':
    432                 return 'inspectorStringArray(%s)' % sub_expression
     432                return 'toJSONStringArray(%s)' % sub_expression
    433433            if objc_class is 'NSNumber':
    434434                protocol_type = ObjCGenerator.protocol_type_for_type(member.type.element_type)
    435435                if protocol_type is 'double':
    436                     return 'inspectorDoubleArray(%s)' % sub_expression
    437                 return 'inspectorIntegerArray(%s)' % sub_expression
    438             return 'inspectorObjectArray(%s)' % sub_expression
     436                    return 'toJSONDoubleArray(%s)' % sub_expression
     437                return 'toJSONIntegerArray(%s)' % sub_expression
     438            return 'toJSONObjectArray(%s)' % sub_expression
    439439
    440440    def protocol_to_objc_expression_for_member(self, declaration, member, sub_expression):
     
    452452            objc_class = self.objc_class_for_type(member.type.element_type)
    453453            if objc_class is 'NSString':
    454                 return 'objcStringArray(%s)' % sub_expression
     454                return 'toObjCStringArray(%s)' % sub_expression
    455455            if objc_class is 'NSNumber':
    456456                protocol_type = ObjCGenerator.protocol_type_for_type(member.type.element_type)
    457457                if protocol_type is 'double':
    458                     return 'objcDoubleArray(%s)' % sub_expression
    459                 return 'objcIntegerArray(%s)' % sub_expression
    460             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)
    461461
    462462    def protocol_to_objc_code_block_for_object_member(self, declaration, member, sub_expression):
     
    466466        lines.append('    if (!object)')
    467467        lines.append('        return nil;')
    468         lines.append('    return [[%s alloc] initWithInspectorObject:[%s toInspectorObject].get()];' % (objc_class, sub_expression))
     468        lines.append('    return [[%s alloc] initWithJSONObject:[%s toJSONObject].get()];' % (objc_class, sub_expression))
    469469        return '\n'.join(lines)
    470470
     
    529529                return 'setObject'
    530530            if raw_name is 'array':
    531                 return 'setInspectorArray'
     531                return 'setJSONArray'
    532532            return None
    533533        if (isinstance(_type, EnumType)):
     
    536536            return 'setObject'
    537537        if (isinstance(_type, ArrayType)):
    538             return 'setInspectorArray'
     538            return 'setJSONArray'
    539539        return None
    540540
     
    560560                return 'objectForKey'
    561561            if raw_name is 'array':
    562                 return 'inspectorArrayForKey'
     562                return 'JSONArrayForKey'
    563563            return None
    564564        if (isinstance(_type, EnumType)):
     
    567567            return 'objectForKey'
    568568        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  
    908908@interface TestProtocolNetworkError : RWIProtocolJSONObject
    909909- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    910 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     910- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    911911- (instancetype)initWithMessage:(NSString *)message code:(int)code;
    912912/* required */ @property (nonatomic, copy) NSString *message;
     
    11571157    return self;
    11581158}
    1159 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    1160 {
    1161     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     1159- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     1160{
     1161    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    11621162        return nil;
    11631163
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result

    r225231 r225243  
    931931        THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors");
    932932        if (columnNames)
    933             resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(*columnNames));
     933            resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(*columnNames));
    934934        if (notes)
    935935            resultObject->setString(ASCIILiteral("notes"), *notes);
     
    937937            resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
    938938        if (values)
    939             resultObject->setObject(ASCIILiteral("values"), [*values toInspectorObject]);
     939            resultObject->setObject(ASCIILiteral("values"), [*values toJSONObject]);
    940940        if (payload)
    941             resultObject->setValue(ASCIILiteral("payload"), [*payload toInspectorObject]);
     941            resultObject->setValue(ASCIILiteral("payload"), [*payload toJSONObject]);
    942942        if (databaseId)
    943943            resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId);
    944944        if (sqlError)
    945             resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toInspectorObject]);
     945            resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toJSONObject]);
    946946        if (screenColor)
    947947            resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor));
    948948        if (alternateColors)
    949             resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(*alternateColors));
     949            resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(*alternateColors));
    950950        if (printColor)
    951951            resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor));
     
    975975        THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors");
    976976        if (columnNames)
    977             resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(*columnNames));
     977            resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(*columnNames));
    978978        if (notes)
    979979            resultObject->setString(ASCIILiteral("notes"), *notes);
     
    981981            resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
    982982        if (values)
    983             resultObject->setObject(ASCIILiteral("values"), [*values toInspectorObject]);
     983            resultObject->setObject(ASCIILiteral("values"), [*values toJSONObject]);
    984984        if (payload)
    985             resultObject->setValue(ASCIILiteral("payload"), [*payload toInspectorObject]);
     985            resultObject->setValue(ASCIILiteral("payload"), [*payload toJSONObject]);
    986986        if (databaseId)
    987987            resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId);
    988988        if (sqlError)
    989             resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toInspectorObject]);
     989            resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toJSONObject]);
    990990        if (screenColor)
    991991            resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor));
    992992        if (alternateColors)
    993             resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(*alternateColors));
     993            resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(*alternateColors));
    994994        if (printColor)
    995995            resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor));
     
    10181018        THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError");
    10191019        THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors");
    1020         resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
     1020        resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames));
    10211021        resultObject->setString(ASCIILiteral("notes"), notes);
    10221022        resultObject->setDouble(ASCIILiteral("timestamp"), timestamp);
    1023         resultObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
    1024         resultObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
     1023        resultObject->setObject(ASCIILiteral("values"), [values toJSONObject]);
     1024        resultObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]);
    10251025        resultObject->setInteger(ASCIILiteral("databaseId"), databaseId);
    1026         resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
    1027         resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
     1026        resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]);
     1027        resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors));
    10281028        resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor));
    10291029        resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor));
     
    10521052        THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError");
    10531053        THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors");
    1054         resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
     1054        resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames));
    10551055        resultObject->setString(ASCIILiteral("notes"), notes);
    10561056        resultObject->setDouble(ASCIILiteral("timestamp"), timestamp);
    1057         resultObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
    1058         resultObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
     1057        resultObject->setObject(ASCIILiteral("values"), [values toJSONObject]);
     1058        resultObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]);
    10591059        resultObject->setInteger(ASCIILiteral("databaseId"), databaseId);
    1060         resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
     1060        resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]);
    10611061        resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor));
    1062         resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
     1062        resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors));
    10631063        resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor));
    10641064        backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false);
     
    13291329@interface TestProtocolDatabaseError : RWIProtocolJSONObject
    13301330- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    1331 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     1331- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    13321332- (instancetype)initWithMessage:(NSString *)message code:(int)code;
    13331333/* required */ @property (nonatomic, copy) NSString *message;
     
    17341734    return self;
    17351735}
    1736 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    1737 {
    1738     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     1736- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     1737{
     1738    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    17391739        return nil;
    17401740
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result

    r225231 r225243  
    830830        THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors");
    831831        if (columnNames)
    832             resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(*columnNames));
     832            resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(*columnNames));
    833833        if (notes)
    834834            resultObject->setString(ASCIILiteral("notes"), *notes);
     
    836836            resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
    837837        if (values)
    838             resultObject->setObject(ASCIILiteral("values"), [*values toInspectorObject]);
     838            resultObject->setObject(ASCIILiteral("values"), [*values toJSONObject]);
    839839        if (payload)
    840             resultObject->setValue(ASCIILiteral("payload"), [*payload toInspectorObject]);
     840            resultObject->setValue(ASCIILiteral("payload"), [*payload toJSONObject]);
    841841        if (databaseId)
    842842            resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId);
    843843        if (sqlError)
    844             resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toInspectorObject]);
     844            resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toJSONObject]);
    845845        if (screenColor)
    846846            resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor));
    847847        if (alternateColors)
    848             resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(*alternateColors));
     848            resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(*alternateColors));
    849849        if (printColor)
    850850            resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor));
     
    854854    NSArray/*<NSString>*/ *o_in_columnNames;
    855855    if (in_columnNames)
    856         o_in_columnNames = objcStringArray(in_columnNames);
     856        o_in_columnNames = toObjCStringArray(in_columnNames);
    857857    NSString *o_in_notes;
    858858    if (in_notes)
     
    863863    RWIProtocolJSONObject *o_in_values;
    864864    if (in_values)
    865         o_in_values = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:in_values] autorelease];
     865        o_in_values = [[[RWIProtocolJSONObject alloc] initWithJSONObject:in_values] autorelease];
    866866    RWIProtocolJSONObject *o_in_payload;
    867867    if (in_payload)
    868         o_in_payload = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:in_payload] autorelease];
     868        o_in_payload = [[[RWIProtocolJSONObject alloc] initWithJSONObject:in_payload] autorelease];
    869869    int o_in_databaseId;
    870870    if (in_databaseId)
     
    872872    TestProtocolDatabaseError *o_in_sqlError;
    873873    if (in_sqlError)
    874         o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithInspectorObject:in_sqlError] autorelease];
     874        o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithJSONObject:in_sqlError] autorelease];
    875875    std::optional<TestProtocolDatabasePrimaryColors> o_in_screenColor;
    876876    if (in_screenColor)
     
    878878    NSArray/*<NSString>*/ *o_in_alternateColors;
    879879    if (in_alternateColors)
    880         o_in_alternateColors = objcStringArray(in_alternateColors);
     880        o_in_alternateColors = toObjCStringArray(in_alternateColors);
    881881    std::optional<TestProtocolDatabaseExecuteAllOptionalParametersPrintColor> o_in_printColor;
    882882    if (in_printColor)
     
    901901        THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError");
    902902        THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors");
    903         resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
     903        resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames));
    904904        resultObject->setString(ASCIILiteral("notes"), notes);
    905905        resultObject->setDouble(ASCIILiteral("timestamp"), timestamp);
    906         resultObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
    907         resultObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
     906        resultObject->setObject(ASCIILiteral("values"), [values toJSONObject]);
     907        resultObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]);
    908908        resultObject->setInteger(ASCIILiteral("databaseId"), databaseId);
    909         resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
     909        resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]);
    910910        resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor));
    911         resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
     911        resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors));
    912912        resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor));
    913913        backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false);
    914914    };
    915915
    916     NSArray/*<NSString>*/ *o_in_columnNames = objcStringArray(&in_columnNames);
     916    NSArray/*<NSString>*/ *o_in_columnNames = toObjCStringArray(&in_columnNames);
    917917    NSString *o_in_notes = in_notes;
    918918    double o_in_timestamp = in_timestamp;
    919     RWIProtocolJSONObject *o_in_values = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:&in_values] autorelease];
    920     RWIProtocolJSONObject *o_in_payload = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:&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];
    921921    int o_in_databaseId = in_databaseId;
    922     TestProtocolDatabaseError *o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithInspectorObject:&in_sqlError] autorelease];
     922    TestProtocolDatabaseError *o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithJSONObject:&in_sqlError] autorelease];
    923923    std::optional<TestProtocolDatabasePrimaryColors> o_in_screenColor = fromProtocolString<TestProtocolDatabasePrimaryColors>(in_screenColor);
    924924    if (!o_in_screenColor) {
     
    926926        return;
    927927    }
    928     NSArray/*<NSString>*/ *o_in_alternateColors = objcStringArray(&in_alternateColors);
     928    NSArray/*<NSString>*/ *o_in_alternateColors = toObjCStringArray(&in_alternateColors);
    929929    std::optional<TestProtocolDatabaseExecuteNoOptionalParametersPrintColor> o_in_printColor = fromProtocolString<TestProtocolDatabaseExecuteNoOptionalParametersPrintColor>(in_printColor);
    930930    if (!o_in_printColor) {
     
    11941194@interface TestProtocolDatabaseError : RWIProtocolJSONObject
    11951195- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    1196 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     1196- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    11971197- (instancetype)initWithMessage:(NSString *)message code:(int)code;
    11981198/* required */ @property (nonatomic, copy) NSString *message;
     
    15971597    return self;
    15981598}
    1599 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    1600 {
    1601     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     1599- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     1600{
     1601    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    16021602        return nil;
    16031603
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result

    r225231 r225243  
    790790    Ref<JSON::Object> paramsObject = JSON::Object::create();
    791791    if (columnNames)
    792         paramsObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray((*columnNames)));
     792        paramsObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray((*columnNames)));
    793793    if (notes)
    794794        paramsObject->setString(ASCIILiteral("notes"), (*notes));
     
    796796        paramsObject->setDouble(ASCIILiteral("timestamp"), (*timestamp));
    797797    if (values)
    798         paramsObject->setObject(ASCIILiteral("values"), [(*values) toInspectorObject]);
     798        paramsObject->setObject(ASCIILiteral("values"), [(*values) toJSONObject]);
    799799    if (payload)
    800         paramsObject->setValue(ASCIILiteral("payload"), [(*payload) toInspectorObject]);
     800        paramsObject->setValue(ASCIILiteral("payload"), [(*payload) toJSONObject]);
    801801    if (sqlError)
    802         paramsObject->setObject(ASCIILiteral("sqlError"), [(*sqlError) toInspectorObject]);
     802        paramsObject->setObject(ASCIILiteral("sqlError"), [(*sqlError) toJSONObject]);
    803803    if (screenColor)
    804804        paramsObject->setString(ASCIILiteral("screenColor"), (*screenColor));
    805805    if (alternateColors)
    806         paramsObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray((*alternateColors)));
     806        paramsObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray((*alternateColors)));
    807807    if (printColor)
    808808        paramsObject->setString(ASCIILiteral("printColor"), (*printColor));
     
    827827    jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteNoOptionalParameters"));
    828828    Ref<JSON::Object> paramsObject = JSON::Object::create();
    829     paramsObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
     829    paramsObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames));
    830830    paramsObject->setString(ASCIILiteral("notes"), notes);
    831831    paramsObject->setDouble(ASCIILiteral("timestamp"), timestamp);
    832     paramsObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
    833     paramsObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
    834     paramsObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
     832    paramsObject->setObject(ASCIILiteral("values"), [values toJSONObject]);
     833    paramsObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]);
     834    paramsObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]);
    835835    paramsObject->setString(ASCIILiteral("screenColor"), screenColor);
    836     paramsObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
     836    paramsObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors));
    837837    paramsObject->setString(ASCIILiteral("printColor"), printColor);
    838838    jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject));
     
    896896@interface TestProtocolDatabaseError : RWIProtocolJSONObject
    897897- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    898 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     898- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    899899- (instancetype)initWithMessage:(NSString *)message code:(int)code;
    900900/* required */ @property (nonatomic, copy) NSString *message;
     
    11641164    return self;
    11651165}
    1166 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    1167 {
    1168     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     1166- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     1167{
     1168    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    11691169        return nil;
    11701170
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result

    r225231 r225243  
    935935@interface TestProtocolNetwork2NetworkError : RWIProtocolJSONObject
    936936- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    937 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     937- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    938938- (instancetype)initWithMessage:(NSString *)message code:(int)code;
    939939/* required */ @property (nonatomic, copy) NSString *message;
     
    11841184    return self;
    11851185}
    1186 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    1187 {
    1188     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     1186- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     1187{
     1188    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    11891189        return nil;
    11901190
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result

    r225231 r225243  
    798798@interface TestProtocolRuntimeKeyPath : RWIProtocolJSONObject
    799799- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    800 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     800- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    801801- (instancetype)initWithType:(TestProtocolRuntimeKeyPathType)type;
    802802/* required */ @property (nonatomic, assign) TestProtocolRuntimeKeyPathType type;
     
    10661066    return self;
    10671067}
    1068 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    1069 {
    1070     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     1068- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     1069{
     1070    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    10711071        return nil;
    10721072
     
    11061106- (void)setArray:(NSArray/*<NSString>*/ *)array
    11071107{
    1108     [super setInspectorArray:inspectorStringArray(array) forKey:@"array"];
     1108    [super setJSONArray:toJSONStringArray(array) forKey:@"array"];
    11091109}
    11101110
    11111111- (NSArray/*<NSString>*/ *)array
    11121112{
    1113     return objcStringArray([super inspectorArrayForKey:@"array"]);
     1113    return toObjCStringArray([super JSONArrayForKey:@"array"]);
    11141114}
    11151115
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result

    r225231 r225243  
    13401340@interface TestProtocolDatabaseError : RWIProtocolJSONObject
    13411341- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    1342 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     1342- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    13431343- (instancetype)initWithMessage:(NSString *)message code:(int)code;
    13441344/* required */ @property (nonatomic, copy) NSString *message;
     
    13491349@interface TestProtocolDatabaseOptionalParameterBundle : RWIProtocolJSONObject
    13501350- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    1351 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     1351- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    13521352/* optional */ @property (nonatomic, copy) NSArray/*<NSString>*/ *columnNames;
    13531353/* optional */ @property (nonatomic, copy) NSArray/*<NSString>*/ *buttons;
     
    13641364@interface TestProtocolDatabaseParameterBundle : RWIProtocolJSONObject
    13651365- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    1366 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     1366- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    13671367- (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;
    13681368/* required */ @property (nonatomic, copy) NSArray/*<NSString>*/ *columnNames;
     
    13801380@interface TestProtocolDatabaseObjectWithPropertyNameConflicts : RWIProtocolJSONObject
    13811381- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    1382 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     1382- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    13831383- (instancetype)initWithInteger:(NSString *)integer array:(NSString *)array string:(NSString *)string value:(NSString *)value object:(NSString *)object;
    13841384/* required */ @property (nonatomic, copy) NSString *integer;
     
    13921392@interface TestProtocolDatabaseDummyObject : RWIProtocolJSONObject
    13931393- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    1394 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     1394- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    13951395@end
    13961396
     
    13981398@interface TestProtocolTestParameterBundle : RWIProtocolJSONObject
    13991399- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    1400 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     1400- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    14011401- (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;
    14021402/* required */ @property (nonatomic, assign) TestProtocolTestParameterBundleDirectionality directionality;
     
    17911791    return self;
    17921792}
    1793 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    1794 {
    1795     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     1793- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     1794{
     1795    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    17961796        return nil;
    17971797
     
    18631863    return self;
    18641864}
    1865 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    1866 {
    1867     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     1865- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     1866{
     1867    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    18681868        return nil;
    18691869
     
    18731873- (void)setColumnNames:(NSArray/*<NSString>*/ *)columnNames
    18741874{
    1875     [super setInspectorArray:inspectorStringArray(columnNames) forKey:@"columnNames"];
     1875    [super setJSONArray:toJSONStringArray(columnNames) forKey:@"columnNames"];
    18761876}
    18771877
    18781878- (NSArray/*<NSString>*/ *)columnNames
    18791879{
    1880     return objcStringArray([super inspectorArrayForKey:@"columnNames"]);
     1880    return toObjCStringArray([super JSONArrayForKey:@"columnNames"]);
    18811881}
    18821882
    18831883- (void)setButtons:(NSArray/*<NSString>*/ *)buttons
    18841884{
    1885     [super setInspectorArray:inspectorStringArray(buttons) forKey:@"buttons"];
     1885    [super setJSONArray:toJSONStringArray(buttons) forKey:@"buttons"];
    18861886}
    18871887
    18881888- (NSArray/*<NSString>*/ *)buttons
    18891889{
    1890     return objcStringArray([super inspectorArrayForKey:@"buttons"]);
     1890    return toObjCStringArray([super JSONArrayForKey:@"buttons"]);
    18911891}
    18921892
     
    19311931    if (!object)
    19321932        return nil;
    1933     return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"values"] toInspectorObject].get()];
     1933    return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"values"] toJSONObject].get()];
    19341934}
    19351935
     
    19441944    if (!object)
    19451945        return nil;
    1946     return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"payload"] toInspectorObject].get()];
     1946    return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"payload"] toJSONObject].get()];
    19471947}
    19481948
     
    19571957    if (!object)
    19581958        return nil;
    1959     return [[TestProtocolDatabaseError alloc] initWithInspectorObject:[[super objectForKey:@"error"] toInspectorObject].get()];
     1959    return [[TestProtocolDatabaseError alloc] initWithJSONObject:[[super objectForKey:@"error"] toJSONObject].get()];
    19601960}
    19611961
     
    19631963{
    19641964    THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(errorList, [TestProtocolDatabaseError class]);
    1965     [super setInspectorArray:inspectorObjectArray(errorList) forKey:@"errorList"];
     1965    [super setJSONArray:toJSONObjectArray(errorList) forKey:@"errorList"];
    19661966}
    19671967
    19681968- (NSArray/*<TestProtocolDatabaseError>*/ *)errorList
    19691969{
    1970     return objcArray<TestProtocolDatabaseError>([super inspectorArrayForKey:@"errorList"]);
     1970    return toObjCArray<TestProtocolDatabaseError>([super JSONArrayForKey:@"errorList"]);
    19711971}
    19721972
     
    20112011    return self;
    20122012}
    2013 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    2014 {
    2015     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     2013- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     2014{
     2015    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    20162016        return nil;
    20172017
     
    20482048- (void)setColumnNames:(NSArray/*<NSString>*/ *)columnNames
    20492049{
    2050     [super setInspectorArray:inspectorStringArray(columnNames) forKey:@"columnNames"];
     2050    [super setJSONArray:toJSONStringArray(columnNames) forKey:@"columnNames"];
    20512051}
    20522052
    20532053- (NSArray/*<NSString>*/ *)columnNames
    20542054{
    2055     return objcStringArray([super inspectorArrayForKey:@"columnNames"]);
     2055    return toObjCStringArray([super JSONArrayForKey:@"columnNames"]);
    20562056}
    20572057
    20582058- (void)setButtons:(NSArray/*<NSString>*/ *)buttons
    20592059{
    2060     [super setInspectorArray:inspectorStringArray(buttons) forKey:@"buttons"];
     2060    [super setJSONArray:toJSONStringArray(buttons) forKey:@"buttons"];
    20612061}
    20622062
    20632063- (NSArray/*<NSString>*/ *)buttons
    20642064{
    2065     return objcStringArray([super inspectorArrayForKey:@"buttons"]);
     2065    return toObjCStringArray([super JSONArrayForKey:@"buttons"]);
    20662066}
    20672067
     
    21062106    if (!object)
    21072107        return nil;
    2108     return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"values"] toInspectorObject].get()];
     2108    return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"values"] toJSONObject].get()];
    21092109}
    21102110
     
    21192119    if (!object)
    21202120        return nil;
    2121     return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"payload"] toInspectorObject].get()];
     2121    return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"payload"] toJSONObject].get()];
    21222122}
    21232123
     
    21322132    if (!object)
    21332133        return nil;
    2134     return [[TestProtocolDatabaseError alloc] initWithInspectorObject:[[super objectForKey:@"error"] toInspectorObject].get()];
     2134    return [[TestProtocolDatabaseError alloc] initWithJSONObject:[[super objectForKey:@"error"] toJSONObject].get()];
    21352135}
    21362136
     
    21382138{
    21392139    THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(errorList, [TestProtocolDatabaseError class]);
    2140     [super setInspectorArray:inspectorObjectArray(errorList) forKey:@"errorList"];
     2140    [super setJSONArray:toJSONObjectArray(errorList) forKey:@"errorList"];
    21412141}
    21422142
    21432143- (NSArray/*<TestProtocolDatabaseError>*/ *)errorList
    21442144{
    2145     return objcArray<TestProtocolDatabaseError>([super inspectorArrayForKey:@"errorList"]);
     2145    return toObjCArray<TestProtocolDatabaseError>([super JSONArrayForKey:@"errorList"]);
    21462146}
    21472147
     
    21722172    return self;
    21732173}
    2174 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    2175 {
    2176     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     2174- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     2175{
     2176    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    21772177        return nil;
    21782178
     
    22612261    return self;
    22622262}
    2263 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    2264 {
    2265     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     2263- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     2264{
     2265    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    22662266        return nil;
    22672267
     
    23072307    return self;
    23082308}
    2309 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    2310 {
    2311     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     2309- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     2310{
     2311    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    23122312        return nil;
    23132313
     
    23512351- (void)setButtons:(NSArray/*<NSString>*/ *)buttons
    23522352{
    2353     [super setInspectorArray:inspectorStringArray(buttons) forKey:@"buttons"];
     2353    [super setJSONArray:toJSONStringArray(buttons) forKey:@"buttons"];
    23542354}
    23552355
    23562356- (NSArray/*<NSString>*/ *)buttons
    23572357{
    2358     return objcStringArray([super inspectorArrayForKey:@"buttons"]);
     2358    return toObjCStringArray([super JSONArrayForKey:@"buttons"]);
    23592359}
    23602360
    23612361- (void)setColumnNames:(NSArray/*<NSString>*/ *)columnNames
    23622362{
    2363     [super setInspectorArray:inspectorStringArray(columnNames) forKey:@"columnNames"];
     2363    [super setJSONArray:toJSONStringArray(columnNames) forKey:@"columnNames"];
    23642364}
    23652365
    23662366- (NSArray/*<NSString>*/ *)columnNames
    23672367{
    2368     return objcStringArray([super inspectorArrayForKey:@"columnNames"]);
     2368    return toObjCStringArray([super JSONArrayForKey:@"columnNames"]);
    23692369}
    23702370
     
    23992399    if (!object)
    24002400        return nil;
    2401     return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"values"] toInspectorObject].get()];
     2401    return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"values"] toJSONObject].get()];
    24022402}
    24032403
     
    24122412    if (!object)
    24132413        return nil;
    2414     return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"payload"] toInspectorObject].get()];
     2414    return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"payload"] toJSONObject].get()];
    24152415}
    24162416
     
    24252425    if (!object)
    24262426        return nil;
    2427     return [[TestProtocolDatabaseError alloc] initWithInspectorObject:[[super objectForKey:@"error"] toInspectorObject].get()];
     2427    return [[TestProtocolDatabaseError alloc] initWithJSONObject:[[super objectForKey:@"error"] toJSONObject].get()];
    24282428}
    24292429
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result

    r225231 r225243  
    11061106@interface TestProtocolTestTypeNeedingCast : RWIProtocolJSONObject
    11071107- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    1108 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     1108- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    11091109- (instancetype)initWithString:(NSString *)string number:(int)number animals:(TestProtocolTestCastedAnimals)animals identifier:(int)identifier tree:(TestProtocolTestRecursiveObject1 *)tree;
    11101110/* required */ @property (nonatomic, copy) NSString *string;
     
    11181118@interface TestProtocolTestRecursiveObject1 : RWIProtocolJSONObject
    11191119- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    1120 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     1120- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    11211121/* optional */ @property (nonatomic, retain) TestProtocolTestRecursiveObject2 *obj;
    11221122@end
     
    11251125@interface TestProtocolTestRecursiveObject2 : RWIProtocolJSONObject
    11261126- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    1127 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     1127- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    11281128/* optional */ @property (nonatomic, retain) TestProtocolTestRecursiveObject1 *obj;
    11291129@end
     
    14761476    return self;
    14771477}
    1478 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    1479 {
    1480     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     1478- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     1479{
     1480    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    14811481        return nil;
    14821482
     
    15511551    if (!object)
    15521552        return nil;
    1553     return [[TestProtocolTestRecursiveObject1 alloc] initWithInspectorObject:[[super objectForKey:@"tree"] toInspectorObject].get()];
     1553    return [[TestProtocolTestRecursiveObject1 alloc] initWithJSONObject:[[super objectForKey:@"tree"] toJSONObject].get()];
    15541554}
    15551555
     
    15671567    return self;
    15681568}
    1569 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    1570 {
    1571     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     1569- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     1570{
     1571    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    15721572        return nil;
    15731573
     
    15851585    if (!object)
    15861586        return nil;
    1587     return [[TestProtocolTestRecursiveObject2 alloc] initWithInspectorObject:[[super objectForKey:@"obj"] toInspectorObject].get()];
     1587    return [[TestProtocolTestRecursiveObject2 alloc] initWithJSONObject:[[super objectForKey:@"obj"] toJSONObject].get()];
    15881588}
    15891589
     
    16011601    return self;
    16021602}
    1603 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    1604 {
    1605     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     1603- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     1604{
     1605    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    16061606        return nil;
    16071607
     
    16191619    if (!object)
    16201620        return nil;
    1621     return [[TestProtocolTestRecursiveObject1 alloc] initWithInspectorObject:[[super objectForKey:@"obj"] toInspectorObject].get()];
     1621    return [[TestProtocolTestRecursiveObject1 alloc] initWithJSONObject:[[super objectForKey:@"obj"] toJSONObject].get()];
    16221622}
    16231623
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result

    r225231 r225243  
    801801@interface TestProtocolTestNoOpenParameters : RWIProtocolJSONObject
    802802- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    803 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     803- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    804804- (instancetype)initWithOne:(double)one two:(double)two;
    805805/* required */ @property (nonatomic, assign) double one;
     
    810810@interface TestProtocolTestOpenParameters : RWIProtocolJSONObject
    811811- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    812 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     812- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    813813- (instancetype)initWithAlpha:(double)alpha beta:(double)beta;
    814814/* required */ @property (nonatomic, assign) double alpha;
     
    10581058    return self;
    10591059}
    1060 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    1061 {
    1062     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     1060- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     1061{
     1062    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    10631063        return nil;
    10641064
     
    11141114    return self;
    11151115}
    1116 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    1117 {
    1118     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     1116- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     1117{
     1118    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    11191119        return nil;
    11201120
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result

    r225231 r225243  
    908908@interface TestProtocolNetworkError : RWIProtocolJSONObject
    909909- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
    910 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
     910- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    911911- (instancetype)initWithMessage:(NSString *)message code:(int)code;
    912912/* required */ @property (nonatomic, copy) NSString *message;
     
    11571157    return self;
    11581158}
    1159 - (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
    1160 {
    1161     if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
     1159- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
     1160{
     1161    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
    11621162        return nil;
    11631163
Note: See TracChangeset for help on using the changeset viewer.