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

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

Issue 1322533002: bindings: Supports to change the method location. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed review comments. Created 5 years, 3 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/v8_methods.py ('k') | Source/bindings/templates/attributes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_utilities.py
diff --git a/Source/bindings/scripts/v8_utilities.py b/Source/bindings/scripts/v8_utilities.py
index 070fa59721cbde8fe9b84dabeb1ea79f35ebc147..a16af83fb5ad43296d59096660d78062b0e7f5b0 100644
--- a/Source/bindings/scripts/v8_utilities.py
+++ b/Source/bindings/scripts/v8_utilities.py
@@ -35,7 +35,7 @@ import re
from idl_types import IdlTypeBase
import idl_types
-from idl_definitions import Exposure, IdlInterface
+from idl_definitions import Exposure, IdlInterface, IdlAttribute, IdlOperation
from v8_globals import includes
ACRONYMS = [
@@ -228,7 +228,8 @@ def conditional_string(definition_or_member):
# [Constructor], [NamedConstructor]
def is_constructor_attribute(member):
# TODO(yukishiino): replace this with [Constructor] and [NamedConstructor] extended attribute
- return member.idl_type.name.endswith('Constructor')
+ return (type(member) == IdlAttribute and
+ member.idl_type.name.endswith('Constructor'))
# [DeprecateAs]
@@ -449,7 +450,8 @@ def on_prototype(interface, member):
# TODO(yukishiino): We should handle [Global] and [PrimaryGlobal] instead of
# Window.
if (interface.name == 'Window'):
- return member.idl_type.name == 'EventHandler'
+ return (member.idl_type.name == 'EventHandler' or
+ type(member) == IdlOperation)
return True
« no previous file with comments | « Source/bindings/scripts/v8_methods.py ('k') | Source/bindings/templates/attributes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698