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

Side by Side Diff: tools/dom/scripts/databasebuilder.py

Issue 63173005: Print more information when Dartium IDL bindings processing fails during build. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 import copy 6 import copy
7 import database 7 import database
8 import idlparser 8 import idlparser
9 import logging 9 import logging
10 import multiprocessing 10 import multiprocessing
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 try: 65 try:
66 f = open(file_name, 'r') 66 f = open(file_name, 'r')
67 content = f.read() 67 content = f.read()
68 f.close() 68 f.close()
69 69
70 idl_ast = idl_parser.parse( 70 idl_ast = idl_parser.parse(
71 content, 71 content,
72 defines=import_options.idl_defines) 72 defines=import_options.idl_defines)
73 return IDLFile(idl_ast, file_name) 73 return IDLFile(idl_ast, file_name)
74 except SyntaxError, e: 74 except SyntaxError, e:
75 raise RuntimeError('Failed to load file %s: %s' 75 raise RuntimeError('Failed to load file %s: %s: Content: %s[end]'
76 % (file_name, e)) 76 % (file_name, e, content))
77 77
78 78
79 class DatabaseBuilder(object): 79 class DatabaseBuilder(object):
80 def __init__(self, database): 80 def __init__(self, database):
81 """DatabaseBuilder is used for importing and merging interfaces into 81 """DatabaseBuilder is used for importing and merging interfaces into
82 the Database""" 82 the Database"""
83 self._database = database 83 self._database = database
84 self._imported_interfaces = [] 84 self._imported_interfaces = []
85 self._impl_stmts = [] 85 self._impl_stmts = []
86 self.conditionals_met = set() 86 self.conditionals_met = set()
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 # TODO(antonm): Ideally we'd like to have pristine copy of WebKit IDLs and fetch 569 # TODO(antonm): Ideally we'd like to have pristine copy of WebKit IDLs and fetch
570 # this information directly from it. Unfortunately right now database is massaged 570 # this information directly from it. Unfortunately right now database is massaged
571 # a lot so it's difficult to maintain necessary information on Window itse lf. 571 # a lot so it's difficult to maintain necessary information on Window itse lf.
572 interface = self._database.GetInterface(type) 572 interface = self._database.GetInterface(type)
573 if 'V8EnabledPerContext' in attr.ext_attrs: 573 if 'V8EnabledPerContext' in attr.ext_attrs:
574 interface.ext_attrs['synthesizedV8EnabledPerContext'] = \ 574 interface.ext_attrs['synthesizedV8EnabledPerContext'] = \
575 attr.ext_attrs['V8EnabledPerContext'] 575 attr.ext_attrs['V8EnabledPerContext']
576 if 'V8EnabledAtRuntime' in attr.ext_attrs: 576 if 'V8EnabledAtRuntime' in attr.ext_attrs:
577 interface.ext_attrs['synthesizedV8EnabledAtRuntime'] = \ 577 interface.ext_attrs['synthesizedV8EnabledAtRuntime'] = \
578 attr.ext_attrs['V8EnabledAtRuntime'] or attr.id 578 attr.ext_attrs['V8EnabledAtRuntime'] or attr.id
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698