Title: [197717] trunk/Source/_javascript_Core
Revision
197717
Author
[email protected]
Date
2016-03-07 16:49:26 -0800 (Mon, 07 Mar 2016)

Log Message

Web Inspector: the protocol generator should generate factory method stubs for protocol types
https://bugs.webkit.org/show_bug.cgi?id=155103
<rdar://problem/25002772>

Reviewed by Timothy Hatcher.

Generate stubs with unique names so that parsing methods can be used
reflectively at runtime, based on the protocol version that's loaded.

* _javascript_Core.xcodeproj/project.pbxproj:
* inspector/scripts/codegen/__init__.py:
* inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py:
Added. For each type in a domain, add a method of the form
-[ProtocolTypeConversions _parseXXX:fromPayload]. This is in a category
method, and the selector is only ever looked up at runtime.

(ObjCProtocolTypeConversionsHeaderGenerator.generate_output):
* inspector/scripts/generate-inspector-protocol-bindings.py:
(generate_from_specification):

Rebaseline test results with new generator output.

* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/expected/enum-values.json-result:
* inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
* inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
* inspector/scripts/tests/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
* inspector/scripts/tests/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (197716 => 197717)


--- trunk/Source/_javascript_Core/ChangeLog	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-03-08 00:49:26 UTC (rev 197717)
@@ -1,3 +1,41 @@
+2016-03-07  Brian Burg  <[email protected]>
+
+        Web Inspector: the protocol generator should generate factory method stubs for protocol types
+        https://bugs.webkit.org/show_bug.cgi?id=155103
+        <rdar://problem/25002772>
+
+        Reviewed by Timothy Hatcher.
+
+        Generate stubs with unique names so that parsing methods can be used
+        reflectively at runtime, based on the protocol version that's loaded.
+
+        * _javascript_Core.xcodeproj/project.pbxproj:
+        * inspector/scripts/codegen/__init__.py:
+        * inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py:
+        Added. For each type in a domain, add a method of the form
+        -[ProtocolTypeConversions _parseXXX:fromPayload]. This is in a category
+        method, and the selector is only ever looked up at runtime.
+
+        (ObjCProtocolTypeConversionsHeaderGenerator.generate_output):
+        * inspector/scripts/generate-inspector-protocol-bindings.py:
+        (generate_from_specification):
+
+        Rebaseline test results with new generator output.
+
+        * inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
+        * inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
+        * inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
+        * inspector/scripts/tests/expected/enum-values.json-result:
+        * inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
+        * inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
+        * inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
+        * inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
+        * inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
+        * inspector/scripts/tests/expected/type-declaration-array-type.json-result:
+        * inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
+        * inspector/scripts/tests/expected/type-declaration-object-type.json-result:
+        * inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
+
 2016-03-07  Filip Pizlo  <[email protected]>
 
         RegExp.prototype.exec() should call into Yarr at most once

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (197716 => 197717)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2016-03-08 00:49:26 UTC (rev 197717)
@@ -1434,6 +1434,7 @@
 		969A079B0ED1D3AE00F1F681 /* Opcode.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07950ED1D3AE00F1F681 /* Opcode.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		978801401471AD920041B016 /* JSDateMath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9788FC221471AD0C0068CE2D /* JSDateMath.cpp */; };
 		978801411471AD920041B016 /* JSDateMath.h in Headers */ = {isa = PBXBuildFile; fileRef = 9788FC231471AD0C0068CE2D /* JSDateMath.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		990DA67F1C8E316A00295159 /* generate_objc_protocol_type_conversions_implementation.py in Headers */ = {isa = PBXBuildFile; fileRef = 990DA67E1C8E311D00295159 /* generate_objc_protocol_type_conversions_implementation.py */; settings = {ATTRIBUTES = (Private, ); }; };
 		9928FF3B18AC4AEC00B8CF12 /* JSReplayInputs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9928FF3918AC4AEC00B8CF12 /* JSReplayInputs.cpp */; };
 		9928FF3C18AC4AEC00B8CF12 /* JSReplayInputs.h in Headers */ = {isa = PBXBuildFile; fileRef = 9928FF3A18AC4AEC00B8CF12 /* JSReplayInputs.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		992ABCF91BEA9BD2006403A0 /* RemoteAutomationTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 992ABCF51BEA94CA006403A0 /* RemoteAutomationTarget.cpp */; };
@@ -3633,6 +3634,7 @@
 		969A09220ED1E09C00F1F681 /* Completion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Completion.cpp; sourceTree = "<group>"; };
 		9788FC221471AD0C0068CE2D /* JSDateMath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDateMath.cpp; sourceTree = "<group>"; };
 		9788FC231471AD0C0068CE2D /* JSDateMath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDateMath.h; sourceTree = "<group>"; };
+		990DA67E1C8E311D00295159 /* generate_objc_protocol_type_conversions_implementation.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = generate_objc_protocol_type_conversions_implementation.py; sourceTree = "<group>"; };
 		9928FF3918AC4AEC00B8CF12 /* JSReplayInputs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReplayInputs.cpp; sourceTree = "<group>"; };
 		9928FF3A18AC4AEC00B8CF12 /* JSReplayInputs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSReplayInputs.h; sourceTree = "<group>"; };
 		9928FF3D18AC4B1C00B8CF12 /* JSInputs.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = JSInputs.json; sourceTree = "<group>"; };
@@ -6853,6 +6855,7 @@
 				A5EA70F519F6DE5A0098F5EC /* generate_objc_header.py */,
 				A5EA70F619F6DE5A0098F5EC /* generate_objc_internal_header.py */,
 				A5EA70F319F6DE5A0098F5EC /* generate_objc_protocol_type_conversions_header.py */,
+				990DA67E1C8E311D00295159 /* generate_objc_protocol_type_conversions_implementation.py */,
 				C4F4B6D71A05C76F005CAB76 /* generate_objc_protocol_types_implementation.py */,
 				C4703CCB192844CC0013FBEA /* generator.py */,
 				C4703CCA192844CC0013FBEA /* generator_templates.py */,
@@ -6896,6 +6899,7 @@
 				0F3730931C0D67EE00052BFA /* AirUseCounts.h in Headers */,
 				0F4570391BE44C910062A629 /* AirEliminateDeadCode.h in Headers */,
 				79B00CBD1C6AB07E0088C65D /* ProxyConstructor.h in Headers */,
+				990DA67F1C8E316A00295159 /* generate_objc_protocol_type_conversions_implementation.py in Headers */,
 				799EF7C41C56ED96002B0534 /* B3PCToOriginMap.h in Headers */,
 				79B00CBF1C6AB07E0088C65D /* ProxyObject.h in Headers */,
 				792CB34A1C4EED5C00D13AF3 /* PCToCodeOriginMap.h in Headers */,

Modified: trunk/Source/_javascript_Core/inspector/scripts/codegen/__init__.py (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/codegen/__init__.py	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/codegen/__init__.py	2016-03-08 00:49:26 UTC (rev 197717)
@@ -22,3 +22,4 @@
 from generate_objc_internal_header import *
 from generate_objc_protocol_types_implementation import *
 from generate_objc_protocol_type_conversions_header import *
+from generate_objc_protocol_type_conversions_implementation import *

Modified: trunk/Source/_javascript_Core/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py	2016-03-08 00:49:26 UTC (rev 197717)
@@ -55,8 +55,10 @@
 
     def generate_output(self):
         headers = [
-            '"%sArrayConversions.h"' % ObjCGenerator.OBJC_STATIC_PREFIX
+            '"%s.h"' % self.protocol_name(),
+            '"%sArrayConversions.h"' % ObjCGenerator.OBJC_STATIC_PREFIX,
         ]
+        headers.sort()
 
         header_args = {
             'includes': '\n'.join(['#import ' + header for header in headers]),

Added: trunk/Source/_javascript_Core/inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py (0 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py	                        (rev 0)
+++ trunk/Source/_javascript_Core/inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py	2016-03-08 00:49:26 UTC (rev 197717)
@@ -0,0 +1,132 @@
+#!/usr/bin/env python
+#
+# Copyright (c) 2016 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+# THE POSSIBILITY OF SUCH DAMAGE.
+
+
+import logging
+import string
+from string import Template
+
+from generator import Generator
+from models import EnumType, ObjectType, ArrayType, AliasedType, PrimitiveType, Frameworks
+from objc_generator import ObjCGenerator
+from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates
+
+log = logging.getLogger('global')
+
+
+def add_newline(lines):
+    if lines and lines[-1] == '':
+        return
+    lines.append('')
+
+
+class ObjCProtocolTypeConversionsImplementationGenerator(ObjCGenerator):
+    def __init__(self, model, input_filepath):
+        ObjCGenerator.__init__(self, model, input_filepath)
+
+    def output_filename(self):
+        return '%sTypeConversions.mm' % self.protocol_name()
+
+    def domains_to_generate(self):
+        return filter(ObjCGenerator.should_generate_domain_types_filter(self.model()), Generator.domains_to_generate(self))
+
+    def generate_output(self):
+        secondary_headers = [
+            '"%s.h"' % self.protocol_name(),
+            '"%sTypeConversions.h"' % ObjCGenerator.OBJC_SHARED_PREFIX,
+            Generator.string_for_file_include('%sJSONObjectPrivate.h' % ObjCGenerator.OBJC_STATIC_PREFIX, Frameworks.WebInspector, self.model().framework),
+        ]
+        secondary_headers.sort()
+
+        header_args = {
+            'primaryInclude': '"%sTypeConversions.h"' % self.protocol_name(),
+            'secondaryIncludes': '\n'.join(['#import ' + header for header in secondary_headers]),
+        }
+
+        domains = self.domains_to_generate()
+        sections = []
+        sections.append(self.generate_license())
+        sections.append(Template(ObjCTemplates.ImplementationPrelude).substitute(None, **header_args))
+        sections.append(self._generate_type_factory_category_interface(domains))
+        sections.append(self._generate_type_factory_category_implementation(domains))
+        sections.append(Template(ObjCTemplates.ImplementationPostlude).substitute(None, **header_args))
+        return '\n\n'.join(sections)
+
+    def _generate_type_factory_category_interface(self, domains):
+        lines = []
+        lines.append('@interface ProtocolTypeConversions (%s)' % self.protocol_name())
+        lines.append('')
+        for domain in domains:
+            for declaration in domain.type_declarations:
+                lines.append(self._generate_type_factory_method_declaration(domain, declaration))
+            add_newline(lines)
+        lines.append('@end')
+        return '\n'.join(lines)
+
+    def _generate_type_factory_method_declaration(self, domain, declaration):
+        resolved_type = declaration.type
+        if isinstance(resolved_type, AliasedType):
+            resolved_type = resolved_type.aliased_type
+        if isinstance(resolved_type, (ObjectType, ArrayType, PrimitiveType)):
+            objc_type = self.objc_class_for_type(resolved_type)
+            return '+ (void)_parse%s:(%s **)outValue fromPayload:(id)payload;' % (declaration.type.raw_name(), objc_type)
+        if isinstance(resolved_type, EnumType):
+            return '+ (void)_parse%s:(NSNumber **)outValue fromPayload:(id)payload;' % declaration.type.raw_name()
+
+    def _generate_type_factory_category_implementation(self, domains):
+        lines = []
+        lines.append('@implementation ProtocolTypeConversions (%s)' % self.protocol_name())
+        lines.append('')
+        for domain in domains:
+            for declaration in domain.type_declarations:
+                lines.append(self._generate_type_factory_method_implementation(domain, declaration))
+                add_newline(lines)
+        lines.append('@end')
+        return '\n'.join(lines)
+
+    def _generate_type_factory_method_implementation(self, domain, declaration):
+        lines = []
+        resolved_type = declaration.type
+        if isinstance(resolved_type, AliasedType):
+            resolved_type = resolved_type.aliased_type
+
+        objc_class = self.objc_class_for_type(resolved_type)
+        if isinstance(resolved_type, (ObjectType, ArrayType, PrimitiveType)):
+            lines.append('+ (void)_parse%s:(%s **)outValue fromPayload:(id)payload' % (declaration.type.raw_name(), objc_class))
+        if isinstance(resolved_type, EnumType):
+            lines.append('+ (void)_parse%s:(NSNumber **)outValue fromPayload:(id)payload' % declaration.type.raw_name())
+
+        lines.append('{')
+        if isinstance(resolved_type, EnumType):
+            lines.append('    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);')
+            lines.append('    *outValue = @(Inspector::fromProtocolString<%s>(payload));' % self.objc_name_for_type(resolved_type))
+        elif isinstance(resolved_type, (ArrayType, PrimitiveType)):
+            lines.append('    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [%s class]);' % objc_class)
+            lines.append('    *outValue = (%s *)payload;' % objc_class)
+        elif isinstance(resolved_type, ObjectType):
+            lines.append('    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);')
+            lines.append('    *outValue = [[%s alloc] initWithPayload:payload];' % (objc_class))
+        lines.append('}')
+        return '\n'.join(lines)

Modified: trunk/Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py	2016-03-08 00:49:26 UTC (rev 197717)
@@ -72,6 +72,7 @@
     from generate_objc_header import *
     from generate_objc_internal_header import *
     from generate_objc_protocol_type_conversions_header import *
+    from generate_objc_protocol_type_conversions_implementation import *
     from generate_objc_protocol_types_implementation import *
 
 
@@ -149,6 +150,7 @@
         generators.append(ObjCHeaderGenerator(protocol, primary_specification_filepath))
         generators.append(ObjCInternalHeaderGenerator(protocol, primary_specification_filepath))
         generators.append(ObjCProtocolTypeConversionsHeaderGenerator(protocol, primary_specification_filepath))
+        generators.append(ObjCProtocolTypeConversionsImplementationGenerator(protocol, primary_specification_filepath))
         generators.append(ObjCProtocolTypesImplementationGenerator(protocol, primary_specification_filepath))
 
     elif protocol.framework is Frameworks._javascript_Core:
@@ -170,6 +172,7 @@
     elif protocol.framework is Frameworks.WebKit and generate_frontend:
         generators.append(ObjCHeaderGenerator(protocol, primary_specification_filepath))
         generators.append(ObjCProtocolTypeConversionsHeaderGenerator(protocol, primary_specification_filepath))
+        generators.append(ObjCProtocolTypeConversionsImplementationGenerator(protocol, primary_specification_filepath))
         generators.append(ObjCProtocolTypesImplementationGenerator(protocol, primary_specification_filepath))
 
     elif protocol.framework is Frameworks.WebInspector:

Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-async-attribute.json-result (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-async-attribute.json-result	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-async-attribute.json-result	2016-03-08 00:49:26 UTC (rev 197717)
@@ -1397,6 +1397,7 @@
 // by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
 
 #import "RWIProtocolArrayConversions.h"
+#import "TestProtocol.h"
 
 namespace Inspector {
 
@@ -1549,6 +1550,86 @@
 
 ### End File: TestProtocolTypeConversions.h
 
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "ProtocolTypeConversions.h"
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseDatabaseId:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parsePrimaryColors:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseColorList:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseDatabaseId:(NSNumber **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSNumber class]);
+    *outValue = (NSNumber *)payload;
+}
+
++ (void)_parsePrimaryColors:(NSNumber **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+    *outValue = @(Inspector::fromProtocolString<TestProtocolDatabasePrimaryColors>(payload));
+}
+
++ (void)_parseColorList:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSString>*/ class]);
+    *outValue = (NSArray/*<NSString>*/ *)payload;
+}
+
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+    *outValue = [[TestProtocolDatabaseError alloc] initWithPayload:payload];
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
 ### Begin File: TestProtocolTypes.mm
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.

Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result	2016-03-08 00:49:26 UTC (rev 197717)
@@ -1252,6 +1252,7 @@
 // by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
 
 #import "RWIProtocolArrayConversions.h"
+#import "TestProtocol.h"
 
 namespace Inspector {
 
@@ -1404,6 +1405,86 @@
 
 ### End File: TestProtocolTypeConversions.h
 
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "ProtocolTypeConversions.h"
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseDatabaseId:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parsePrimaryColors:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseColorList:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseDatabaseId:(NSNumber **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSNumber class]);
+    *outValue = (NSNumber *)payload;
+}
+
++ (void)_parsePrimaryColors:(NSNumber **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+    *outValue = @(Inspector::fromProtocolString<TestProtocolDatabasePrimaryColors>(payload));
+}
+
++ (void)_parseColorList:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSString>*/ class]);
+    *outValue = (NSArray/*<NSString>*/ *)payload;
+}
+
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+    *outValue = [[TestProtocolDatabaseError alloc] initWithPayload:payload];
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
 ### Begin File: TestProtocolTypes.mm
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.

Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result	2016-03-08 00:49:26 UTC (rev 197717)
@@ -1284,6 +1284,7 @@
 // by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
 
 #import "RWIProtocolArrayConversions.h"
+#import "TestProtocol.h"
 
 namespace Inspector {
 
@@ -1300,6 +1301,65 @@
 
 ### End File: TestProtocolTypeConversions.h
 
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "ProtocolTypeConversions.h"
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseLoaderId:(NSString **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseLoaderId:(NSString **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+    *outValue = (NSString *)payload;
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
 ### Begin File: TestProtocolTypes.mm
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.

Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/enum-values.json-result (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/enum-values.json-result	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/enum-values.json-result	2016-03-08 00:49:26 UTC (rev 197717)
@@ -1028,6 +1028,7 @@
 // by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
 
 #import "RWIProtocolArrayConversions.h"
+#import "TestProtocol.h"
 
 namespace Inspector {
 
@@ -1124,6 +1125,65 @@
 
 ### End File: TestProtocolTypeConversions.h
 
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "ProtocolTypeConversions.h"
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseTypeDomainEnum:(NSNumber **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseTypeDomainEnum:(NSNumber **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+    *outValue = @(Inspector::fromProtocolString<TestProtocolTypeDomainEnum>(payload));
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
 ### Begin File: TestProtocolTypes.mm
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.

Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/events-with-optional-parameters.json-result (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/events-with-optional-parameters.json-result	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/events-with-optional-parameters.json-result	2016-03-08 00:49:26 UTC (rev 197717)
@@ -1010,6 +1010,7 @@
 // by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
 
 #import "RWIProtocolArrayConversions.h"
+#import "TestProtocol.h"
 
 namespace Inspector {
 
@@ -1022,6 +1023,86 @@
 
 ### End File: TestProtocolTypeConversions.h
 
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "ProtocolTypeConversions.h"
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseDatabaseId:(NSString **)outValue fromPayload:(id)payload;
++ (void)_parsePrimaryColors:(NSString **)outValue fromPayload:(id)payload;
++ (void)_parseColorList:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseDatabaseId:(NSString **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+    *outValue = (NSString *)payload;
+}
+
++ (void)_parsePrimaryColors:(NSString **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+    *outValue = (NSString *)payload;
+}
+
++ (void)_parseColorList:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSString>*/ class]);
+    *outValue = (NSArray/*<NSString>*/ *)payload;
+}
+
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+    *outValue = [[TestProtocolDatabaseError alloc] initWithPayload:payload];
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
 ### Begin File: TestProtocolTypes.mm
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.

Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result	2016-03-08 00:49:26 UTC (rev 197717)
@@ -1059,6 +1059,7 @@
 // by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
 
 #import "RWIProtocolArrayConversions.h"
+#import "TestProtocol.h"
 
 namespace Inspector {
 
@@ -1075,6 +1076,65 @@
 
 ### End File: TestProtocolTypeConversions.h
 
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "ProtocolTypeConversions.h"
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseNetworkError:(TestProtocolNetwork2NetworkError **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseNetworkError:(TestProtocolNetwork2NetworkError **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+    *outValue = [[TestProtocolNetwork2NetworkError alloc] initWithPayload:payload];
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
 ### Begin File: TestProtocolTypes.mm
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.

Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/same-type-id-different-domain.json-result (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/same-type-id-different-domain.json-result	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/same-type-id-different-domain.json-result	2016-03-08 00:49:26 UTC (rev 197717)
@@ -779,6 +779,7 @@
 // by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
 
 #import "RWIProtocolArrayConversions.h"
+#import "TestProtocol.h"
 
 namespace Inspector {
 
@@ -793,6 +794,73 @@
 
 ### End File: TestProtocolTypeConversions.h
 
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "ProtocolTypeConversions.h"
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseRemoteObjectId:(NSString **)outValue fromPayload:(id)payload;
+
++ (void)_parseRemoteObjectId:(NSString **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseRemoteObjectId:(NSString **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+    *outValue = (NSString *)payload;
+}
+
++ (void)_parseRemoteObjectId:(NSString **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+    *outValue = (NSString *)payload;
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
 ### Begin File: TestProtocolTypes.mm
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.

Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result	2016-03-08 00:49:26 UTC (rev 197717)
@@ -859,6 +859,7 @@
 // by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
 
 #import "RWIProtocolArrayConversions.h"
+#import "TestProtocol.h"
 
 namespace Inspector {
 
@@ -895,6 +896,65 @@
 
 ### End File: TestProtocolTypeConversions.h
 
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "ProtocolTypeConversions.h"
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseKeyPath:(TestProtocolRuntimeKeyPath **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseKeyPath:(TestProtocolRuntimeKeyPath **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+    *outValue = [[TestProtocolRuntimeKeyPath alloc] initWithPayload:payload];
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
 ### Begin File: TestProtocolTypes.mm
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.

Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result	2016-03-08 00:49:26 UTC (rev 197717)
@@ -768,6 +768,7 @@
 // by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
 
 #import "RWIProtocolArrayConversions.h"
+#import "TestProtocol.h"
 
 namespace Inspector {
 
@@ -780,6 +781,65 @@
 
 ### End File: TestProtocolTypeConversions.h
 
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "ProtocolTypeConversions.h"
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseRemoteObjectId:(NSNumber **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseRemoteObjectId:(NSNumber **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSNumber class]);
+    *outValue = (NSNumber *)payload;
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
 ### Begin File: TestProtocolTypes.mm
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.

Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-array-type.json-result (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-array-type.json-result	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-array-type.json-result	2016-03-08 00:49:26 UTC (rev 197717)
@@ -807,6 +807,7 @@
 // by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
 
 #import "RWIProtocolArrayConversions.h"
+#import "TestProtocol.h"
 
 namespace Inspector {
 
@@ -845,6 +846,115 @@
 
 ### End File: TestProtocolTypeConversions.h
 
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "ProtocolTypeConversions.h"
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseBreakpointId:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseReason:(NSNumber **)outValue fromPayload:(id)payload;
+
++ (void)_parseObjectId:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseLuckyNumbers:(NSArray/*<NSNumber>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseBabyNames:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseNewObjects:(NSArray/*<NSNumber>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseOldObjects:(NSArray/*<NSNumber>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseStopReasons:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseBreakpointId:(NSNumber **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSNumber class]);
+    *outValue = (NSNumber *)payload;
+}
+
++ (void)_parseReason:(NSNumber **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+    *outValue = @(Inspector::fromProtocolString<TestProtocolDebuggerReason>(payload));
+}
+
++ (void)_parseObjectId:(NSNumber **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSNumber class]);
+    *outValue = (NSNumber *)payload;
+}
+
++ (void)_parseLuckyNumbers:(NSArray/*<NSNumber>*/ **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSNumber>*/ class]);
+    *outValue = (NSArray/*<NSNumber>*/ *)payload;
+}
+
++ (void)_parseBabyNames:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSString>*/ class]);
+    *outValue = (NSArray/*<NSString>*/ *)payload;
+}
+
++ (void)_parseNewObjects:(NSArray/*<NSNumber>*/ **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSNumber>*/ class]);
+    *outValue = (NSArray/*<NSNumber>*/ *)payload;
+}
+
++ (void)_parseOldObjects:(NSArray/*<NSNumber>*/ **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSNumber>*/ class]);
+    *outValue = (NSArray/*<NSNumber>*/ *)payload;
+}
+
++ (void)_parseStopReasons:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSString>*/ class]);
+    *outValue = (NSArray/*<NSString>*/ *)payload;
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
 ### Begin File: TestProtocolTypes.mm
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.

Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-enum-type.json-result (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-enum-type.json-result	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-enum-type.json-result	2016-03-08 00:49:26 UTC (rev 197717)
@@ -810,6 +810,7 @@
 // by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
 
 #import "RWIProtocolArrayConversions.h"
+#import "TestProtocol.h"
 
 namespace Inspector {
 
@@ -879,6 +880,72 @@
 
 ### End File: TestProtocolTypeConversions.h
 
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "ProtocolTypeConversions.h"
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseFarmAnimals:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseTwoLeggedAnimals:(NSNumber **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseFarmAnimals:(NSNumber **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+    *outValue = @(Inspector::fromProtocolString<TestProtocolRuntimeFarmAnimals>(payload));
+}
+
++ (void)_parseTwoLeggedAnimals:(NSNumber **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+    *outValue = @(Inspector::fromProtocolString<TestProtocolRuntimeTwoLeggedAnimals>(payload));
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
 ### Begin File: TestProtocolTypes.mm
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.

Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-object-type.json-result (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-object-type.json-result	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-object-type.json-result	2016-03-08 00:49:26 UTC (rev 197717)
@@ -1304,6 +1304,7 @@
 // by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
 
 #import "RWIProtocolArrayConversions.h"
+#import "TestProtocol.h"
 
 namespace Inspector {
 
@@ -1318,6 +1319,108 @@
 
 ### End File: TestProtocolTypeConversions.h
 
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "ProtocolTypeConversions.h"
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload;
++ (void)_parseErrorList:(NSArray/*<TestProtocolDatabaseError>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseOptionalParameterBundle:(TestProtocolDatabaseOptionalParameterBundle **)outValue fromPayload:(id)payload;
++ (void)_parseParameterBundle:(TestProtocolDatabaseParameterBundle **)outValue fromPayload:(id)payload;
++ (void)_parseObjectWithPropertyNameConflicts:(TestProtocolDatabaseObjectWithPropertyNameConflicts **)outValue fromPayload:(id)payload;
++ (void)_parseDummyObject:(TestProtocolDatabaseDummyObject **)outValue fromPayload:(id)payload;
+
++ (void)_parseParameterBundle:(TestProtocolTestParameterBundle **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+    *outValue = [[TestProtocolDatabaseError alloc] initWithPayload:payload];
+}
+
++ (void)_parseErrorList:(NSArray/*<TestProtocolDatabaseError>*/ **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<TestProtocolDatabaseError>*/ class]);
+    *outValue = (NSArray/*<TestProtocolDatabaseError>*/ *)payload;
+}
+
++ (void)_parseOptionalParameterBundle:(TestProtocolDatabaseOptionalParameterBundle **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+    *outValue = [[TestProtocolDatabaseOptionalParameterBundle alloc] initWithPayload:payload];
+}
+
++ (void)_parseParameterBundle:(TestProtocolDatabaseParameterBundle **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+    *outValue = [[TestProtocolDatabaseParameterBundle alloc] initWithPayload:payload];
+}
+
++ (void)_parseObjectWithPropertyNameConflicts:(TestProtocolDatabaseObjectWithPropertyNameConflicts **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+    *outValue = [[TestProtocolDatabaseObjectWithPropertyNameConflicts alloc] initWithPayload:payload];
+}
+
++ (void)_parseDummyObject:(TestProtocolDatabaseDummyObject **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+    *outValue = [[TestProtocolDatabaseDummyObject alloc] initWithPayload:payload];
+}
+
++ (void)_parseParameterBundle:(TestProtocolTestParameterBundle **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+    *outValue = [[TestProtocolTestParameterBundle alloc] initWithPayload:payload];
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
 ### Begin File: TestProtocolTypes.mm
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.

Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result (197716 => 197717)


--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result	2016-03-08 00:45:25 UTC (rev 197716)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result	2016-03-08 00:49:26 UTC (rev 197717)
@@ -1161,6 +1161,7 @@
 // by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
 
 #import "RWIProtocolArrayConversions.h"
+#import "TestProtocol.h"
 
 namespace Inspector {
 
@@ -1230,6 +1231,107 @@
 
 ### End File: TestProtocolTypeConversions.h
 
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/_javascript_Core/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "ProtocolTypeConversions.h"
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseTypeNeedingCast:(TestProtocolTestTypeNeedingCast **)outValue fromPayload:(id)payload;
++ (void)_parseCastedObjectId:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseUncastedObjectId:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseUncastedAnimals:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseCastedAnimals:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseRecursiveObject1:(TestProtocolTestRecursiveObject1 **)outValue fromPayload:(id)payload;
++ (void)_parseRecursiveObject2:(TestProtocolTestRecursiveObject2 **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation ProtocolTypeConversions (TestProtocol)
+
++ (void)_parseTypeNeedingCast:(TestProtocolTestTypeNeedingCast **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+    *outValue = [[TestProtocolTestTypeNeedingCast alloc] initWithPayload:payload];
+}
+
++ (void)_parseCastedObjectId:(NSNumber **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSNumber class]);
+    *outValue = (NSNumber *)payload;
+}
+
++ (void)_parseUncastedObjectId:(NSNumber **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSNumber class]);
+    *outValue = (NSNumber *)payload;
+}
+
++ (void)_parseUncastedAnimals:(NSNumber **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+    *outValue = @(Inspector::fromProtocolString<TestProtocolTestUncastedAnimals>(payload));
+}
+
++ (void)_parseCastedAnimals:(NSNumber **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+    *outValue = @(Inspector::fromProtocolString<TestProtocolTestCastedAnimals>(payload));
+}
+
++ (void)_parseRecursiveObject1:(TestProtocolTestRecursiveObject1 **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+    *outValue = [[TestProtocolTestRecursiveObject1 alloc] initWithPayload:payload];
+}
+
++ (void)_parseRecursiveObject2:(TestProtocolTestRecursiveObject2 **)outValue fromPayload:(id)payload
+{
+    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+    *outValue = [[TestProtocolTestRecursiveObject2 alloc] initWithPayload:payload];
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
 ### Begin File: TestProtocolTypes.mm
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to