Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (225242 => 225243)
--- trunk/Source/_javascript_Core/ChangeLog 2017-11-28 23:11:17 UTC (rev 225242)
+++ trunk/Source/_javascript_Core/ChangeLog 2017-11-28 23:34:07 UTC (rev 225243)
@@ -1,3 +1,40 @@
+ 2017-11-28 Brian Burg <[email protected]>
+
+ [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:
+
2017-11-27 JF Bastien <[email protected]>
_javascript_ rest function parameter with negative index leads to bad DFG abstract interpretation
Modified: trunk/Source/_javascript_Core/inspector/scripts/codegen/generate_objc_header.py (225242 => 225243)
--- trunk/Source/_javascript_Core/inspector/scripts/codegen/generate_objc_header.py 2017-11-28 23:11:17 UTC (rev 225242)
+++ trunk/Source/_javascript_Core/inspector/scripts/codegen/generate_objc_header.py 2017-11-28 23:34:07 UTC (rev 225243)
@@ -166,10 +166,10 @@
lines.append('__attribute__((visibility ("default")))')
lines.append('@interface %s : %sJSONObject' % (objc_name, ObjCGenerator.OBJC_STATIC_PREFIX))
- # The initializers that take a payload or inspector object are only needed by the frontend.
+ # The initializers that take a payload or protocol object are only needed by the frontend.
if self.get_generator_setting('generate_frontend', False):
lines.append('- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;')
- lines.append('- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;')
+ lines.append('- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;')
required_members = filter(lambda member: not member.is_optional, declaration.type_members)
optional_members = filter(lambda member: member.is_optional, declaration.type_members)
Modified: trunk/Source/_javascript_Core/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py (225242 => 225243)
--- trunk/Source/_javascript_Core/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py 2017-11-28 23:11:17 UTC (rev 225242)
+++ trunk/Source/_javascript_Core/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py 2017-11-28 23:34:07 UTC (rev 225243)
@@ -94,7 +94,7 @@
if self.get_generator_setting('generate_frontend', False):
lines.append('')
lines.append(self._generate_init_method_for_payload(domain, declaration))
- lines.append(self._generate_init_method_for_json_object(domain, declaration))
+ lines.append(self._generate_init_method_for_protocol_object(domain, declaration))
required_members = filter(lambda member: not member.is_optional, declaration.type_members)
if required_members:
lines.append('')
@@ -108,11 +108,11 @@
lines.append('@end')
return '\n'.join(lines)
- def _generate_init_method_for_json_object(self, domain, declaration):
+ def _generate_init_method_for_protocol_object(self, domain, declaration):
lines = []
- lines.append('- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject')
+ lines.append('- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object')
lines.append('{')
- lines.append(' if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))')
+ lines.append(' if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))')
lines.append(' return nil;')
lines.append('')
lines.append(' return self;')
Modified: trunk/Source/_javascript_Core/inspector/scripts/codegen/objc_generator.py (225242 => 225243)
--- trunk/Source/_javascript_Core/inspector/scripts/codegen/objc_generator.py 2017-11-28 23:11:17 UTC (rev 225242)
+++ trunk/Source/_javascript_Core/inspector/scripts/codegen/objc_generator.py 2017-11-28 23:34:07 UTC (rev 225243)
@@ -247,7 +247,7 @@
if raw_name is 'boolean':
return 'bool'
if raw_name in ['any', 'object']:
- return 'InspectorObject'
+ return 'JSON::Object'
return None
@staticmethod
@@ -371,19 +371,19 @@
return 'toProtocolString(%s)' % var_name
return var_name
if category is ObjCTypeCategory.Object:
- return '[%s toInspectorObject]' % var_name
+ return '[%s toJSONObject]' % var_name
if category is ObjCTypeCategory.Array:
protocol_type = ObjCGenerator.protocol_type_for_type(var_type.element_type)
objc_class = self.objc_class_for_type(var_type.element_type)
if protocol_type == 'Inspector::Protocol::Array<String>':
- return 'inspectorStringArrayArray(%s)' % var_name
+ return 'toJSONStringArrayArray(%s)' % var_name
if protocol_type is 'String' and objc_class is 'NSString':
- return 'inspectorStringArray(%s)' % var_name
+ return 'toJSONStringArray(%s)' % var_name
if protocol_type is 'int' and objc_class is 'NSNumber':
- return 'inspectorIntegerArray(%s)' % var_name
+ return 'toJSONIntegerArray(%s)' % var_name
if protocol_type is 'double' and objc_class is 'NSNumber':
- return 'inspectorDoubleArray(%s)' % var_name
- return 'inspectorObjectArray(%s)' % var_name
+ return 'toJSONDoubleArray(%s)' % var_name
+ return 'toJSONObjectArray(%s)' % var_name
def objc_protocol_import_expression_for_member(self, name, declaration, member):
if isinstance(member.type, EnumType):
@@ -405,14 +405,14 @@
return var_name
if category is ObjCTypeCategory.Object:
objc_class = self.objc_class_for_type(var_type)
- return '[[[%s alloc] initWithInspectorObject:%s] autorelease]' % (objc_class, var_name)
+ return '[[[%s alloc] initWithJSONObject:%s] autorelease]' % (objc_class, var_name)
if category is ObjCTypeCategory.Array:
objc_class = self.objc_class_for_type(var_type.element_type)
if objc_class is 'NSString':
- return 'objcStringArray(%s)' % var_name
+ return 'toObjCStringArray(%s)' % var_name
if objc_class is 'NSNumber': # FIXME: Integer or Double?
- return 'objcIntegerArray(%s)' % var_name
- return 'objcArray<%s>(%s)' % (objc_class, var_name)
+ return 'toObjCIntegerArray(%s)' % var_name
+ return 'toObjCArray<%s>(%s)' % (objc_class, var_name)
# ObjC <-> JSON object conversion for types getters/setters.
# - convert a member setter from ObjC API to JSON object setter
@@ -429,13 +429,13 @@
if category is ObjCTypeCategory.Array:
objc_class = self.objc_class_for_type(member.type.element_type)
if objc_class is 'NSString':
- return 'inspectorStringArray(%s)' % sub_expression
+ return 'toJSONStringArray(%s)' % sub_expression
if objc_class is 'NSNumber':
protocol_type = ObjCGenerator.protocol_type_for_type(member.type.element_type)
if protocol_type is 'double':
- return 'inspectorDoubleArray(%s)' % sub_expression
- return 'inspectorIntegerArray(%s)' % sub_expression
- return 'inspectorObjectArray(%s)' % sub_expression
+ return 'toJSONDoubleArray(%s)' % sub_expression
+ return 'toJSONIntegerArray(%s)' % sub_expression
+ return 'toJSONObjectArray(%s)' % sub_expression
def protocol_to_objc_expression_for_member(self, declaration, member, sub_expression):
category = ObjCTypeCategory.category_for_type(member.type)
@@ -451,13 +451,13 @@
protocol_type = ObjCGenerator.protocol_type_for_type(member.type.element_type)
objc_class = self.objc_class_for_type(member.type.element_type)
if objc_class is 'NSString':
- return 'objcStringArray(%s)' % sub_expression
+ return 'toObjCStringArray(%s)' % sub_expression
if objc_class is 'NSNumber':
protocol_type = ObjCGenerator.protocol_type_for_type(member.type.element_type)
if protocol_type is 'double':
- return 'objcDoubleArray(%s)' % sub_expression
- return 'objcIntegerArray(%s)' % sub_expression
- return 'objcArray<%s>(%s)' % (objc_class, sub_expression)
+ return 'toObjCDoubleArray(%s)' % sub_expression
+ return 'toObjCIntegerArray(%s)' % sub_expression
+ return 'toObjCArray<%s>(%s)' % (objc_class, sub_expression)
def protocol_to_objc_code_block_for_object_member(self, declaration, member, sub_expression):
objc_class = self.objc_class_for_type(member.type)
@@ -465,7 +465,7 @@
lines.append(' %sJSONObject *object = %s;' % (ObjCGenerator.OBJC_STATIC_PREFIX, sub_expression))
lines.append(' if (!object)')
lines.append(' return nil;')
- lines.append(' return [[%s alloc] initWithInspectorObject:[%s toInspectorObject].get()];' % (objc_class, sub_expression))
+ lines.append(' return [[%s alloc] initWithJSONObject:[%s toJSONObject].get()];' % (objc_class, sub_expression))
return '\n'.join(lines)
def payload_to_objc_expression_for_member(self, declaration, member):
@@ -528,7 +528,7 @@
if raw_name in ['any', 'object']:
return 'setObject'
if raw_name is 'array':
- return 'setInspectorArray'
+ return 'setJSONArray'
return None
if (isinstance(_type, EnumType)):
return 'setString'
@@ -535,7 +535,7 @@
if (isinstance(_type, ObjectType)):
return 'setObject'
if (isinstance(_type, ArrayType)):
- return 'setInspectorArray'
+ return 'setJSONArray'
return None
@staticmethod
@@ -559,7 +559,7 @@
if raw_name in ['any', 'object']:
return 'objectForKey'
if raw_name is 'array':
- return 'inspectorArrayForKey'
+ return 'JSONArrayForKey'
return None
if (isinstance(_type, EnumType)):
return 'stringForKey'
@@ -566,5 +566,5 @@
if (isinstance(_type, ObjectType)):
return 'objectForKey'
if (isinstance(_type, ArrayType)):
- return 'inspectorArrayForKey'
+ return 'JSONArrayForKey'
return None
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result (225242 => 225243)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result 2017-11-28 23:11:17 UTC (rev 225242)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result 2017-11-28 23:34:07 UTC (rev 225243)
@@ -907,7 +907,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolNetworkError : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
- (instancetype)initWithMessage:(NSString *)message code:(int)code;
/* required */ @property (nonatomic, copy) NSString *message;
/* required */ @property (nonatomic, assign) int code;
@@ -1156,9 +1156,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result (225242 => 225243)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result 2017-11-28 23:11:17 UTC (rev 225242)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result 2017-11-28 23:34:07 UTC (rev 225243)
@@ -930,23 +930,23 @@
THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(sqlError, @"sqlError");
THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors");
if (columnNames)
- resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(*columnNames));
+ resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(*columnNames));
if (notes)
resultObject->setString(ASCIILiteral("notes"), *notes);
if (timestamp)
resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
if (values)
- resultObject->setObject(ASCIILiteral("values"), [*values toInspectorObject]);
+ resultObject->setObject(ASCIILiteral("values"), [*values toJSONObject]);
if (payload)
- resultObject->setValue(ASCIILiteral("payload"), [*payload toInspectorObject]);
+ resultObject->setValue(ASCIILiteral("payload"), [*payload toJSONObject]);
if (databaseId)
resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId);
if (sqlError)
- resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toInspectorObject]);
+ resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toJSONObject]);
if (screenColor)
resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor));
if (alternateColors)
- resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(*alternateColors));
+ resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(*alternateColors));
if (printColor)
resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor));
backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false);
@@ -974,23 +974,23 @@
THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(sqlError, @"sqlError");
THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors");
if (columnNames)
- resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(*columnNames));
+ resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(*columnNames));
if (notes)
resultObject->setString(ASCIILiteral("notes"), *notes);
if (timestamp)
resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
if (values)
- resultObject->setObject(ASCIILiteral("values"), [*values toInspectorObject]);
+ resultObject->setObject(ASCIILiteral("values"), [*values toJSONObject]);
if (payload)
- resultObject->setValue(ASCIILiteral("payload"), [*payload toInspectorObject]);
+ resultObject->setValue(ASCIILiteral("payload"), [*payload toJSONObject]);
if (databaseId)
resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId);
if (sqlError)
- resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toInspectorObject]);
+ resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toJSONObject]);
if (screenColor)
resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor));
if (alternateColors)
- resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(*alternateColors));
+ resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(*alternateColors));
if (printColor)
resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor));
backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false);
@@ -1017,14 +1017,14 @@
THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(payload, @"payload");
THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError");
THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors");
- resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
+ resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames));
resultObject->setString(ASCIILiteral("notes"), notes);
resultObject->setDouble(ASCIILiteral("timestamp"), timestamp);
- resultObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
- resultObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
+ resultObject->setObject(ASCIILiteral("values"), [values toJSONObject]);
+ resultObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]);
resultObject->setInteger(ASCIILiteral("databaseId"), databaseId);
- resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
- resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
+ resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]);
+ resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors));
resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor));
resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor));
backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false);
@@ -1051,15 +1051,15 @@
THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(payload, @"payload");
THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError");
THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors");
- resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
+ resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames));
resultObject->setString(ASCIILiteral("notes"), notes);
resultObject->setDouble(ASCIILiteral("timestamp"), timestamp);
- resultObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
- resultObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
+ resultObject->setObject(ASCIILiteral("values"), [values toJSONObject]);
+ resultObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]);
resultObject->setInteger(ASCIILiteral("databaseId"), databaseId);
- resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
+ resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]);
resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor));
- resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
+ resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors));
resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor));
backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false);
};
@@ -1328,7 +1328,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolDatabaseError : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
- (instancetype)initWithMessage:(NSString *)message code:(int)code;
/* required */ @property (nonatomic, copy) NSString *message;
/* required */ @property (nonatomic, assign) int code;
@@ -1733,9 +1733,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result (225242 => 225243)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result 2017-11-28 23:11:17 UTC (rev 225242)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result 2017-11-28 23:34:07 UTC (rev 225243)
@@ -829,23 +829,23 @@
THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(sqlError, @"sqlError");
THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors");
if (columnNames)
- resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(*columnNames));
+ resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(*columnNames));
if (notes)
resultObject->setString(ASCIILiteral("notes"), *notes);
if (timestamp)
resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
if (values)
- resultObject->setObject(ASCIILiteral("values"), [*values toInspectorObject]);
+ resultObject->setObject(ASCIILiteral("values"), [*values toJSONObject]);
if (payload)
- resultObject->setValue(ASCIILiteral("payload"), [*payload toInspectorObject]);
+ resultObject->setValue(ASCIILiteral("payload"), [*payload toJSONObject]);
if (databaseId)
resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId);
if (sqlError)
- resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toInspectorObject]);
+ resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toJSONObject]);
if (screenColor)
resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor));
if (alternateColors)
- resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(*alternateColors));
+ resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(*alternateColors));
if (printColor)
resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor));
backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false);
@@ -853,7 +853,7 @@
NSArray/*<NSString>*/ *o_in_columnNames;
if (in_columnNames)
- o_in_columnNames = objcStringArray(in_columnNames);
+ o_in_columnNames = toObjCStringArray(in_columnNames);
NSString *o_in_notes;
if (in_notes)
o_in_notes = *in_notes;
@@ -862,22 +862,22 @@
o_in_timestamp = *in_timestamp;
RWIProtocolJSONObject *o_in_values;
if (in_values)
- o_in_values = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:in_values] autorelease];
+ o_in_values = [[[RWIProtocolJSONObject alloc] initWithJSONObject:in_values] autorelease];
RWIProtocolJSONObject *o_in_payload;
if (in_payload)
- o_in_payload = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:in_payload] autorelease];
+ o_in_payload = [[[RWIProtocolJSONObject alloc] initWithJSONObject:in_payload] autorelease];
int o_in_databaseId;
if (in_databaseId)
o_in_databaseId = *in_databaseId;
TestProtocolDatabaseError *o_in_sqlError;
if (in_sqlError)
- o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithInspectorObject:in_sqlError] autorelease];
+ o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithJSONObject:in_sqlError] autorelease];
std::optional<TestProtocolDatabasePrimaryColors> o_in_screenColor;
if (in_screenColor)
o_in_screenColor = fromProtocolString<TestProtocolDatabasePrimaryColors>(*in_screenColor);
NSArray/*<NSString>*/ *o_in_alternateColors;
if (in_alternateColors)
- o_in_alternateColors = objcStringArray(in_alternateColors);
+ o_in_alternateColors = toObjCStringArray(in_alternateColors);
std::optional<TestProtocolDatabaseExecuteAllOptionalParametersPrintColor> o_in_printColor;
if (in_printColor)
o_in_printColor = fromProtocolString<TestProtocolDatabaseExecuteAllOptionalParametersPrintColor>(*in_printColor);
@@ -900,32 +900,32 @@
THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(payload, @"payload");
THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError");
THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors");
- resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
+ resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames));
resultObject->setString(ASCIILiteral("notes"), notes);
resultObject->setDouble(ASCIILiteral("timestamp"), timestamp);
- resultObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
- resultObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
+ resultObject->setObject(ASCIILiteral("values"), [values toJSONObject]);
+ resultObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]);
resultObject->setInteger(ASCIILiteral("databaseId"), databaseId);
- resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
+ resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]);
resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor));
- resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
+ resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors));
resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor));
backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false);
};
- NSArray/*<NSString>*/ *o_in_columnNames = objcStringArray(&in_columnNames);
+ NSArray/*<NSString>*/ *o_in_columnNames = toObjCStringArray(&in_columnNames);
NSString *o_in_notes = in_notes;
double o_in_timestamp = in_timestamp;
- RWIProtocolJSONObject *o_in_values = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:&in_values] autorelease];
- RWIProtocolJSONObject *o_in_payload = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:&in_payload] autorelease];
+ RWIProtocolJSONObject *o_in_values = [[[RWIProtocolJSONObject alloc] initWithJSONObject:&in_values] autorelease];
+ RWIProtocolJSONObject *o_in_payload = [[[RWIProtocolJSONObject alloc] initWithJSONObject:&in_payload] autorelease];
int o_in_databaseId = in_databaseId;
- TestProtocolDatabaseError *o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithInspectorObject:&in_sqlError] autorelease];
+ TestProtocolDatabaseError *o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithJSONObject:&in_sqlError] autorelease];
std::optional<TestProtocolDatabasePrimaryColors> o_in_screenColor = fromProtocolString<TestProtocolDatabasePrimaryColors>(in_screenColor);
if (!o_in_screenColor) {
backendDispatcher()->reportProtocolError(BackendDispatcher::InvalidParams, String::format("Parameter '%s' of method '%s' cannot be processed", "screenColor", "Database.executeNoOptionalParameters"));
return;
}
- NSArray/*<NSString>*/ *o_in_alternateColors = objcStringArray(&in_alternateColors);
+ NSArray/*<NSString>*/ *o_in_alternateColors = toObjCStringArray(&in_alternateColors);
std::optional<TestProtocolDatabaseExecuteNoOptionalParametersPrintColor> o_in_printColor = fromProtocolString<TestProtocolDatabaseExecuteNoOptionalParametersPrintColor>(in_printColor);
if (!o_in_printColor) {
backendDispatcher()->reportProtocolError(BackendDispatcher::InvalidParams, String::format("Parameter '%s' of method '%s' cannot be processed", "printColor", "Database.executeNoOptionalParameters"));
@@ -1193,7 +1193,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolDatabaseError : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
- (instancetype)initWithMessage:(NSString *)message code:(int)code;
/* required */ @property (nonatomic, copy) NSString *message;
/* required */ @property (nonatomic, assign) int code;
@@ -1596,9 +1596,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result (225242 => 225243)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result 2017-11-28 23:11:17 UTC (rev 225242)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result 2017-11-28 23:34:07 UTC (rev 225243)
@@ -789,21 +789,21 @@
jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteOptionalParameters"));
Ref<JSON::Object> paramsObject = JSON::Object::create();
if (columnNames)
- paramsObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray((*columnNames)));
+ paramsObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray((*columnNames)));
if (notes)
paramsObject->setString(ASCIILiteral("notes"), (*notes));
if (timestamp)
paramsObject->setDouble(ASCIILiteral("timestamp"), (*timestamp));
if (values)
- paramsObject->setObject(ASCIILiteral("values"), [(*values) toInspectorObject]);
+ paramsObject->setObject(ASCIILiteral("values"), [(*values) toJSONObject]);
if (payload)
- paramsObject->setValue(ASCIILiteral("payload"), [(*payload) toInspectorObject]);
+ paramsObject->setValue(ASCIILiteral("payload"), [(*payload) toJSONObject]);
if (sqlError)
- paramsObject->setObject(ASCIILiteral("sqlError"), [(*sqlError) toInspectorObject]);
+ paramsObject->setObject(ASCIILiteral("sqlError"), [(*sqlError) toJSONObject]);
if (screenColor)
paramsObject->setString(ASCIILiteral("screenColor"), (*screenColor));
if (alternateColors)
- paramsObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray((*alternateColors)));
+ paramsObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray((*alternateColors)));
if (printColor)
paramsObject->setString(ASCIILiteral("printColor"), (*printColor));
jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject));
@@ -826,14 +826,14 @@
Ref<JSON::Object> jsonMessage = JSON::Object::create();
jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteNoOptionalParameters"));
Ref<JSON::Object> paramsObject = JSON::Object::create();
- paramsObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
+ paramsObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames));
paramsObject->setString(ASCIILiteral("notes"), notes);
paramsObject->setDouble(ASCIILiteral("timestamp"), timestamp);
- paramsObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
- paramsObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
- paramsObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
+ paramsObject->setObject(ASCIILiteral("values"), [values toJSONObject]);
+ paramsObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]);
+ paramsObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]);
paramsObject->setString(ASCIILiteral("screenColor"), screenColor);
- paramsObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
+ paramsObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors));
paramsObject->setString(ASCIILiteral("printColor"), printColor);
jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject));
router.sendEvent(jsonMessage->toJSONString());
@@ -895,7 +895,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolDatabaseError : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
- (instancetype)initWithMessage:(NSString *)message code:(int)code;
/* required */ @property (nonatomic, copy) NSString *message;
/* required */ @property (nonatomic, assign) int code;
@@ -1163,9 +1163,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result (225242 => 225243)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result 2017-11-28 23:11:17 UTC (rev 225242)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result 2017-11-28 23:34:07 UTC (rev 225243)
@@ -934,7 +934,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolNetwork2NetworkError : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
- (instancetype)initWithMessage:(NSString *)message code:(int)code;
/* required */ @property (nonatomic, copy) NSString *message;
/* required */ @property (nonatomic, assign) int code;
@@ -1183,9 +1183,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result (225242 => 225243)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result 2017-11-28 23:11:17 UTC (rev 225242)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result 2017-11-28 23:34:07 UTC (rev 225243)
@@ -797,7 +797,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolRuntimeKeyPath : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
- (instancetype)initWithType:(TestProtocolRuntimeKeyPathType)type;
/* required */ @property (nonatomic, assign) TestProtocolRuntimeKeyPathType type;
/* optional */ @property (nonatomic, copy) NSString *string;
@@ -1065,9 +1065,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
@@ -1105,12 +1105,12 @@
- (void)setArray:(NSArray/*<NSString>*/ *)array
{
- [super setInspectorArray:inspectorStringArray(array) forKey:@"array"];
+ [super setJSONArray:toJSONStringArray(array) forKey:@"array"];
}
- (NSArray/*<NSString>*/ *)array
{
- return objcStringArray([super inspectorArrayForKey:@"array"]);
+ return toObjCStringArray([super JSONArrayForKey:@"array"]);
}
@end
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result (225242 => 225243)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result 2017-11-28 23:11:17 UTC (rev 225242)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result 2017-11-28 23:34:07 UTC (rev 225243)
@@ -1339,7 +1339,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolDatabaseError : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
- (instancetype)initWithMessage:(NSString *)message code:(int)code;
/* required */ @property (nonatomic, copy) NSString *message;
/* required */ @property (nonatomic, assign) int code;
@@ -1348,7 +1348,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolDatabaseOptionalParameterBundle : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
/* optional */ @property (nonatomic, copy) NSArray/*<NSString>*/ *columnNames;
/* optional */ @property (nonatomic, copy) NSArray/*<NSString>*/ *buttons;
/* optional */ @property (nonatomic, assign) TestProtocolDatabaseOptionalParameterBundleDirectionality directionality;
@@ -1363,7 +1363,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolDatabaseParameterBundle : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
- (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;
/* required */ @property (nonatomic, copy) NSArray/*<NSString>*/ *columnNames;
/* required */ @property (nonatomic, copy) NSArray/*<NSString>*/ *buttons;
@@ -1379,7 +1379,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolDatabaseObjectWithPropertyNameConflicts : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
- (instancetype)initWithInteger:(NSString *)integer array:(NSString *)array string:(NSString *)string value:(NSString *)value object:(NSString *)object;
/* required */ @property (nonatomic, copy) NSString *integer;
/* required */ @property (nonatomic, copy) NSString *array;
@@ -1391,13 +1391,13 @@
__attribute__((visibility ("default")))
@interface TestProtocolDatabaseDummyObject : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
@end
__attribute__((visibility ("default")))
@interface TestProtocolTestParameterBundle : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
- (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;
/* required */ @property (nonatomic, assign) TestProtocolTestParameterBundleDirectionality directionality;
/* required */ @property (nonatomic, copy) NSArray/*<NSString>*/ *buttons;
@@ -1790,9 +1790,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
@@ -1862,9 +1862,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
@@ -1872,22 +1872,22 @@
- (void)setColumnNames:(NSArray/*<NSString>*/ *)columnNames
{
- [super setInspectorArray:inspectorStringArray(columnNames) forKey:@"columnNames"];
+ [super setJSONArray:toJSONStringArray(columnNames) forKey:@"columnNames"];
}
- (NSArray/*<NSString>*/ *)columnNames
{
- return objcStringArray([super inspectorArrayForKey:@"columnNames"]);
+ return toObjCStringArray([super JSONArrayForKey:@"columnNames"]);
}
- (void)setButtons:(NSArray/*<NSString>*/ *)buttons
{
- [super setInspectorArray:inspectorStringArray(buttons) forKey:@"buttons"];
+ [super setJSONArray:toJSONStringArray(buttons) forKey:@"buttons"];
}
- (NSArray/*<NSString>*/ *)buttons
{
- return objcStringArray([super inspectorArrayForKey:@"buttons"]);
+ return toObjCStringArray([super JSONArrayForKey:@"buttons"]);
}
- (void)setDirectionality:(TestProtocolDatabaseOptionalParameterBundleDirectionality)directionality
@@ -1930,7 +1930,7 @@
RWIProtocolJSONObject *object = [super objectForKey:@"values"];
if (!object)
return nil;
- return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"values"] toInspectorObject].get()];
+ return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"values"] toJSONObject].get()];
}
- (void)setPayload:(RWIProtocolJSONObject *)payload
@@ -1943,7 +1943,7 @@
RWIProtocolJSONObject *object = [super objectForKey:@"payload"];
if (!object)
return nil;
- return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"payload"] toInspectorObject].get()];
+ return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"payload"] toJSONObject].get()];
}
- (void)setError:(TestProtocolDatabaseError *)error
@@ -1956,18 +1956,18 @@
RWIProtocolJSONObject *object = [super objectForKey:@"error"];
if (!object)
return nil;
- return [[TestProtocolDatabaseError alloc] initWithInspectorObject:[[super objectForKey:@"error"] toInspectorObject].get()];
+ return [[TestProtocolDatabaseError alloc] initWithJSONObject:[[super objectForKey:@"error"] toJSONObject].get()];
}
- (void)setErrorList:(NSArray/*<TestProtocolDatabaseError>*/ *)errorList
{
THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(errorList, [TestProtocolDatabaseError class]);
- [super setInspectorArray:inspectorObjectArray(errorList) forKey:@"errorList"];
+ [super setJSONArray:toJSONObjectArray(errorList) forKey:@"errorList"];
}
- (NSArray/*<TestProtocolDatabaseError>*/ *)errorList
{
- return objcArray<TestProtocolDatabaseError>([super inspectorArrayForKey:@"errorList"]);
+ return toObjCArray<TestProtocolDatabaseError>([super JSONArrayForKey:@"errorList"]);
}
@end
@@ -2010,9 +2010,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
@@ -2047,22 +2047,22 @@
- (void)setColumnNames:(NSArray/*<NSString>*/ *)columnNames
{
- [super setInspectorArray:inspectorStringArray(columnNames) forKey:@"columnNames"];
+ [super setJSONArray:toJSONStringArray(columnNames) forKey:@"columnNames"];
}
- (NSArray/*<NSString>*/ *)columnNames
{
- return objcStringArray([super inspectorArrayForKey:@"columnNames"]);
+ return toObjCStringArray([super JSONArrayForKey:@"columnNames"]);
}
- (void)setButtons:(NSArray/*<NSString>*/ *)buttons
{
- [super setInspectorArray:inspectorStringArray(buttons) forKey:@"buttons"];
+ [super setJSONArray:toJSONStringArray(buttons) forKey:@"buttons"];
}
- (NSArray/*<NSString>*/ *)buttons
{
- return objcStringArray([super inspectorArrayForKey:@"buttons"]);
+ return toObjCStringArray([super JSONArrayForKey:@"buttons"]);
}
- (void)setDirectionality:(TestProtocolDatabaseParameterBundleDirectionality)directionality
@@ -2105,7 +2105,7 @@
RWIProtocolJSONObject *object = [super objectForKey:@"values"];
if (!object)
return nil;
- return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"values"] toInspectorObject].get()];
+ return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"values"] toJSONObject].get()];
}
- (void)setPayload:(RWIProtocolJSONObject *)payload
@@ -2118,7 +2118,7 @@
RWIProtocolJSONObject *object = [super objectForKey:@"payload"];
if (!object)
return nil;
- return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"payload"] toInspectorObject].get()];
+ return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"payload"] toJSONObject].get()];
}
- (void)setError:(TestProtocolDatabaseError *)error
@@ -2131,18 +2131,18 @@
RWIProtocolJSONObject *object = [super objectForKey:@"error"];
if (!object)
return nil;
- return [[TestProtocolDatabaseError alloc] initWithInspectorObject:[[super objectForKey:@"error"] toInspectorObject].get()];
+ return [[TestProtocolDatabaseError alloc] initWithJSONObject:[[super objectForKey:@"error"] toJSONObject].get()];
}
- (void)setErrorList:(NSArray/*<TestProtocolDatabaseError>*/ *)errorList
{
THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(errorList, [TestProtocolDatabaseError class]);
- [super setInspectorArray:inspectorObjectArray(errorList) forKey:@"errorList"];
+ [super setJSONArray:toJSONObjectArray(errorList) forKey:@"errorList"];
}
- (NSArray/*<TestProtocolDatabaseError>*/ *)errorList
{
- return objcArray<TestProtocolDatabaseError>([super inspectorArrayForKey:@"errorList"]);
+ return toObjCArray<TestProtocolDatabaseError>([super JSONArrayForKey:@"errorList"]);
}
@end
@@ -2171,9 +2171,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
@@ -2260,9 +2260,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
@@ -2306,9 +2306,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
@@ -2350,22 +2350,22 @@
- (void)setButtons:(NSArray/*<NSString>*/ *)buttons
{
- [super setInspectorArray:inspectorStringArray(buttons) forKey:@"buttons"];
+ [super setJSONArray:toJSONStringArray(buttons) forKey:@"buttons"];
}
- (NSArray/*<NSString>*/ *)buttons
{
- return objcStringArray([super inspectorArrayForKey:@"buttons"]);
+ return toObjCStringArray([super JSONArrayForKey:@"buttons"]);
}
- (void)setColumnNames:(NSArray/*<NSString>*/ *)columnNames
{
- [super setInspectorArray:inspectorStringArray(columnNames) forKey:@"columnNames"];
+ [super setJSONArray:toJSONStringArray(columnNames) forKey:@"columnNames"];
}
- (NSArray/*<NSString>*/ *)columnNames
{
- return objcStringArray([super inspectorArrayForKey:@"columnNames"]);
+ return toObjCStringArray([super JSONArrayForKey:@"columnNames"]);
}
- (void)setNotes:(NSString *)notes
@@ -2398,7 +2398,7 @@
RWIProtocolJSONObject *object = [super objectForKey:@"values"];
if (!object)
return nil;
- return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"values"] toInspectorObject].get()];
+ return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"values"] toJSONObject].get()];
}
- (void)setPayload:(RWIProtocolJSONObject *)payload
@@ -2411,7 +2411,7 @@
RWIProtocolJSONObject *object = [super objectForKey:@"payload"];
if (!object)
return nil;
- return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"payload"] toInspectorObject].get()];
+ return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"payload"] toJSONObject].get()];
}
- (void)setError:(TestProtocolDatabaseError *)error
@@ -2424,7 +2424,7 @@
RWIProtocolJSONObject *object = [super objectForKey:@"error"];
if (!object)
return nil;
- return [[TestProtocolDatabaseError alloc] initWithInspectorObject:[[super objectForKey:@"error"] toInspectorObject].get()];
+ return [[TestProtocolDatabaseError alloc] initWithJSONObject:[[super objectForKey:@"error"] toJSONObject].get()];
}
@end
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result (225242 => 225243)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result 2017-11-28 23:11:17 UTC (rev 225242)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result 2017-11-28 23:34:07 UTC (rev 225243)
@@ -1105,7 +1105,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolTestTypeNeedingCast : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
- (instancetype)initWithString:(NSString *)string number:(int)number animals:(TestProtocolTestCastedAnimals)animals identifier:(int)identifier tree:(TestProtocolTestRecursiveObject1 *)tree;
/* required */ @property (nonatomic, copy) NSString *string;
/* required */ @property (nonatomic, assign) int number;
@@ -1117,7 +1117,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolTestRecursiveObject1 : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
/* optional */ @property (nonatomic, retain) TestProtocolTestRecursiveObject2 *obj;
@end
@@ -1124,7 +1124,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolTestRecursiveObject2 : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
/* optional */ @property (nonatomic, retain) TestProtocolTestRecursiveObject1 *obj;
@end
@@ -1475,9 +1475,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
@@ -1550,7 +1550,7 @@
RWIProtocolJSONObject *object = [super objectForKey:@"tree"];
if (!object)
return nil;
- return [[TestProtocolTestRecursiveObject1 alloc] initWithInspectorObject:[[super objectForKey:@"tree"] toInspectorObject].get()];
+ return [[TestProtocolTestRecursiveObject1 alloc] initWithJSONObject:[[super objectForKey:@"tree"] toJSONObject].get()];
}
@end
@@ -1566,9 +1566,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
@@ -1584,7 +1584,7 @@
RWIProtocolJSONObject *object = [super objectForKey:@"obj"];
if (!object)
return nil;
- return [[TestProtocolTestRecursiveObject2 alloc] initWithInspectorObject:[[super objectForKey:@"obj"] toInspectorObject].get()];
+ return [[TestProtocolTestRecursiveObject2 alloc] initWithJSONObject:[[super objectForKey:@"obj"] toJSONObject].get()];
}
@end
@@ -1600,9 +1600,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
@@ -1618,7 +1618,7 @@
RWIProtocolJSONObject *object = [super objectForKey:@"obj"];
if (!object)
return nil;
- return [[TestProtocolTestRecursiveObject1 alloc] initWithInspectorObject:[[super objectForKey:@"obj"] toInspectorObject].get()];
+ return [[TestProtocolTestRecursiveObject1 alloc] initWithJSONObject:[[super objectForKey:@"obj"] toJSONObject].get()];
}
@end
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result (225242 => 225243)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result 2017-11-28 23:11:17 UTC (rev 225242)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result 2017-11-28 23:34:07 UTC (rev 225243)
@@ -800,7 +800,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolTestNoOpenParameters : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
- (instancetype)initWithOne:(double)one two:(double)two;
/* required */ @property (nonatomic, assign) double one;
/* required */ @property (nonatomic, assign) double two;
@@ -809,7 +809,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolTestOpenParameters : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
- (instancetype)initWithAlpha:(double)alpha beta:(double)beta;
/* required */ @property (nonatomic, assign) double alpha;
/* required */ @property (nonatomic, assign) double beta;
@@ -1057,9 +1057,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
@@ -1113,9 +1113,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result (225242 => 225243)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result 2017-11-28 23:11:17 UTC (rev 225242)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result 2017-11-28 23:34:07 UTC (rev 225243)
@@ -907,7 +907,7 @@
__attribute__((visibility ("default")))
@interface TestProtocolNetworkError : RWIProtocolJSONObject
- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
- (instancetype)initWithMessage:(NSString *)message code:(int)code;
/* required */ @property (nonatomic, copy) NSString *message;
/* required */ @property (nonatomic, assign) int code;
@@ -1156,9 +1156,9 @@
return self;
}
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
{
- if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
return nil;
return self;