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

Unified Diff: Source/bindings/scripts/idl_compiler.py

Issue 17572008: WIP IDL compiler rewrite (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Branch: const + primitive type readonly attributes Created 7 years, 4 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 | « Source/bindings/scripts/deprecated_code_generator_v8.pm ('k') | Source/bindings/scripts/v8_attributes.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/idl_compiler.py
diff --git a/Source/bindings/scripts/idl_compiler.py b/Source/bindings/scripts/idl_compiler.py
index 520008b28972437a02ada57792167cacfe4c77e7..eed8d35228ad5b3be5b8c48fa16700ad6eedac70 100755
--- a/Source/bindings/scripts/idl_compiler.py
+++ b/Source/bindings/scripts/idl_compiler.py
@@ -49,6 +49,7 @@ import shlex
import sys
import code_generator_v8
+import my_code_generator_v8
import idl_reader
@@ -113,16 +114,20 @@ def main():
reader = idl_reader.IdlReader(options.interface_dependencies_file, options.additional_idl_files, options.idl_attributes_file, output_directory, verbose)
definitions = reader.read_idl_definitions(idl_filename)
- code_generator = code_generator_v8.CodeGeneratorV8(definitions, interface_name, options.output_directory, relative_dir_posix, options.idl_directories, verbose)
- if not definitions:
- # We generate dummy .h and .cpp files just to tell build scripts
- # that outputs have been created.
- code_generator.write_dummy_header_and_cpp()
- return
- if options.dump_json_and_pickle:
- write_json_and_pickle(definitions, interface_name, output_directory)
- return
- code_generator.write_header_and_cpp()
+ try:
+ code_generator = code_generator_v8.CodeGeneratorV8(definitions, interface_name, options.output_directory, relative_dir_posix, options.idl_directories, verbose)
+ if not definitions:
+ # We generate dummy .h and .cpp files just to tell build scripts
+ # that outputs have been created.
+ code_generator.write_dummy_header_and_cpp()
+ return
+ if options.dump_json_and_pickle:
+ write_json_and_pickle(definitions, interface_name, output_directory)
+ return
+ code_generator.write_header_and_cpp()
+ except Exception as err:
+ # Log exceptions, but don't fail (just testing)
+ print err
if __name__ == '__main__':
« no previous file with comments | « Source/bindings/scripts/deprecated_code_generator_v8.pm ('k') | Source/bindings/scripts/v8_attributes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698