Commit 5b56f82e authored by haraken@chromium.org's avatar haraken@chromium.org

Add 'idl_name' to IdlDefinition, IdlOperation, IdlAttribute etc

IdlDefinition, IdlOperation, IdlAttribute etc should know the name of an IDL file
where they are defined. We want to pass these names to PrivateScriptRunner's methods
so that PrivateScriptRunner can understand the names of JS files of the DOM attributes/methods
that the PrivateScriptRunner is running.

Binding componentization for partial interfaces also need this change.

BUG=341031

Review URL: https://codereview.chromium.org/473893002

git-svn-id: svn://svn.chromium.org/blink/trunk@180275 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 333be66f
...@@ -69,7 +69,8 @@ class IdlReader(object): ...@@ -69,7 +69,8 @@ class IdlReader(object):
ast = blink_idl_parser.parse_file(self.parser, idl_filename) ast = blink_idl_parser.parse_file(self.parser, idl_filename)
if not ast: if not ast:
raise Exception('Failed to parse %s' % idl_filename) raise Exception('Failed to parse %s' % idl_filename)
definitions = IdlDefinitions(ast) idl_name = os.path.basename(idl_filename)
definitions = IdlDefinitions(idl_name, ast)
# Validate file contents with filename convention # Validate file contents with filename convention
# The Blink IDL filenaming convention is that the file # The Blink IDL filenaming convention is that the file
......
...@@ -255,7 +255,7 @@ def interface_context(interface): ...@@ -255,7 +255,7 @@ def interface_context(interface):
# Stringifier # Stringifier
if interface.stringifier: if interface.stringifier:
stringifier = interface.stringifier stringifier = interface.stringifier
method = IdlOperation() method = IdlOperation(interface.idl_name)
method.name = 'toString' method.name = 'toString'
method.idl_type = IdlType('DOMString') method.idl_type = IdlType('DOMString')
method.extended_attributes.update(stringifier.extended_attributes) method.extended_attributes.update(stringifier.extended_attributes)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment