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

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

Issue 345393004: IDL: Support 'stringifier' keyword (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: move handling of unnamed operations Created 6 years, 6 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/idl_definitions.py ('k') | Source/bindings/tests/idls/TestInterface.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_interface.py
diff --git a/Source/bindings/scripts/v8_interface.py b/Source/bindings/scripts/v8_interface.py
index 9f790a3e93270d875ab485e18049850158741196..d02a30681b91071e49a64858a973716ba3c28963 100644
--- a/Source/bindings/scripts/v8_interface.py
+++ b/Source/bindings/scripts/v8_interface.py
@@ -36,6 +36,8 @@ from collections import defaultdict
import itertools
from operator import itemgetter
+import idl_definitions
+from idl_definitions import IdlOperation
import idl_types
from idl_types import IdlType, inherits_interface
import v8_attributes
@@ -252,6 +254,19 @@ def interface_context(interface):
if method.name] # Skip anonymous special operations (methods)
compute_method_overloads_context(methods)
+ # Stringifier
+ if interface.stringifier:
+ stringifier = interface.stringifier
+ method = IdlOperation()
+ method.name = 'toString'
+ method.idl_type = IdlType('DOMString')
+ method.extended_attributes.update(stringifier.extended_attributes)
+ if stringifier.attribute:
+ method.extended_attributes['ImplementedAs'] = stringifier.attribute.name
+ elif stringifier.operation:
+ method.extended_attributes['ImplementedAs'] = stringifier.operation.name
+ methods.append(v8_methods.method_context(interface, method))
+
per_context_enabled_methods = []
custom_registration_methods = []
method_configuration_methods = []
« no previous file with comments | « Source/bindings/scripts/idl_definitions.py ('k') | Source/bindings/tests/idls/TestInterface.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698