Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: core/inspector/CodeGeneratorInspector.py

Issue 126143003: Update IDL to Chrome 32 (Closed) Base URL: https://dart.googlecode.com/svn/third_party/WebCore
Patch Set: Add new files Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/html/track/VTTRegionList.idl ('k') | core/inspector/CodeGeneratorInspectorStrings.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/inspector/CodeGeneratorInspector.py
diff --git a/core/inspector/CodeGeneratorInspector.py b/core/inspector/CodeGeneratorInspector.py
index 20122e6a7f9e002fe1996f1169f82117824d050d..163ce99c1f9270361693af692f52d18ac79d4127 100755
--- a/core/inspector/CodeGeneratorInspector.py
+++ b/core/inspector/CodeGeneratorInspector.py
@@ -1281,8 +1281,8 @@ class TypeBindings:
for prop_data in resolve_data.main_properties + resolve_data.optional_properties:
prop_name = prop_data.p["name"]
prop_field_name = Capitalizer.lower_camel_case_to_upper(prop_name)
- writer.newline(" static const char* %s;\n" % (prop_field_name))
- cpp_writer.newline("const char* %s%s::%s = \"%s\";\n" % (helper.full_name_prefix_for_impl, class_name, prop_field_name, prop_name))
+ writer.newline(" static const char %s[];\n" % (prop_field_name))
+ cpp_writer.newline("const char %s%s::%s[] = \"%s\";\n" % (helper.full_name_prefix_for_impl, class_name, prop_field_name, prop_name))
writer.newline("};\n\n")
@@ -1773,6 +1773,8 @@ class Generator:
backend_method_declaration_list = []
backend_method_implementation_list = []
backend_method_name_declaration_list = []
+ backend_method_name_declaration_index_list = []
+ backend_method_name_declaration_current_index = 0
method_handler_list = []
frontend_method_list = []
@@ -1796,6 +1798,7 @@ class Generator:
Generator.backend_method_declaration_list,
Generator.backend_method_implementation_list,
Generator.backend_method_name_declaration_list,
+ Generator.backend_method_name_declaration_index_list,
Generator.backend_agent_interface_list,
Generator.frontend_class_field_lines,
Generator.frontend_constructor_init_list,
@@ -1921,9 +1924,11 @@ class Generator:
if "parameters" in json_command:
json_params = json_command["parameters"]
- method_in_code += Templates.param_container_access_code
request_message_param = " requestMessageObject"
+ if json_params:
+ method_in_code += Templates.param_container_access_code
+
for json_parameter in json_params:
json_param_name = json_parameter["name"]
param_raw_type = resolve_param_raw_type(json_parameter, domain_name)
@@ -2063,7 +2068,10 @@ class Generator:
responseCook=normal_response_cook_text,
errorCook=error_response_cook_text,
commandNameIndex=cmd_enum_name))
- Generator.backend_method_name_declaration_list.append(" \"%s.%s\"," % (domain_name, json_command_name))
+ declaration_command_name = "%s.%s\\0" % (domain_name, json_command_name)
+ Generator.backend_method_name_declaration_list.append(" \"%s\"" % declaration_command_name)
+ Generator.backend_method_name_declaration_index_list.append(" %d," % Generator.backend_method_name_declaration_current_index)
+ Generator.backend_method_name_declaration_current_index += len(declaration_command_name) - 1
Generator.backend_agent_interface_list.append(") = 0;\n")
@@ -2307,6 +2315,7 @@ backend_cpp_file.write(Templates.backend_cpp.substitute(None,
setters="\n".join(Generator.backend_setters_list),
fieldDeclarations="\n".join(Generator.backend_field_list),
methodNameDeclarations="\n".join(Generator.backend_method_name_declaration_list),
+ methodNameDeclarationsIndex="\n".join(Generator.backend_method_name_declaration_index_list),
methods="\n".join(Generator.backend_method_implementation_list),
methodDeclarations="\n".join(Generator.backend_method_declaration_list),
messageHandlers="\n".join(Generator.method_handler_list)))
« no previous file with comments | « core/html/track/VTTRegionList.idl ('k') | core/inspector/CodeGeneratorInspectorStrings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698