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

Unified Diff: tools/dom/scripts/dartgenerator.py

Issue 1744613003: Fixed more sdk/lib issues (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « tools/dom/scripts/dartdomgenerator.py ('k') | tools/dom/scripts/generate_blink_file.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/dartgenerator.py
diff --git a/tools/dom/scripts/dartgenerator.py b/tools/dom/scripts/dartgenerator.py
index 5adbe3a8264b713bc77d310fc399bc52dbfa62bc..e3e96257a7836ce88c7adb378bd6972bcf8fd90d 100755
--- a/tools/dom/scripts/dartgenerator.py
+++ b/tools/dom/scripts/dartgenerator.py
@@ -12,6 +12,7 @@ import os
import re
import shutil
from generator import *
+from idlnode import IDLType
_logger = logging.getLogger('dartgenerator')
@@ -245,10 +246,17 @@ class DartGenerator(object):
if 'ScriptArguments' in call_with:
operation.arguments.append(ARG)
- # TODO(terry): Hack to remove 3rd arguments in setInterval/setTimeout.
- def HackCleanupTimers(self, database):
+ def CleanupOperationArguments(self, database):
for interface in database.GetInterfaces():
for operation in interface.operations:
+ # TODO(terry): Hack to remove 3rd arguments in setInterval/setTimeout.
if ((operation.id == 'setInterval' or operation.id == 'setTimeout') and \
operation.arguments[0].type.id == 'any'):
operation.arguments.pop(2)
+
+ # Massage any operation argument type that is IDLEnum to String.
+ for index, argument in enumerate(operation.arguments):
+ type_name = argument.type.id
+ if database.HasEnum(type_name):
+ operation.arguments[index].type = IDLType('DOMString')
+
« no previous file with comments | « tools/dom/scripts/dartdomgenerator.py ('k') | tools/dom/scripts/generate_blink_file.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698