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

Unified Diff: Source/WebCore/bindings/dart/gyp/scripts/build_dart_snapshot.py

Issue 9350041: Switch to dartgenerator.py for C++ callbacks generation. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Created 8 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
Index: Source/WebCore/bindings/dart/gyp/scripts/build_dart_snapshot.py
diff --git a/Source/WebCore/bindings/dart/gyp/scripts/build_dart_snapshot.py b/Source/WebCore/bindings/dart/gyp/scripts/build_dart_snapshot.py
index a9bff518db6eef7596f39e908b131601e7216ba8..955ee4feb7476a72a10ff7ccbf3fe504bf76c3df 100644
--- a/Source/WebCore/bindings/dart/gyp/scripts/build_dart_snapshot.py
+++ b/Source/WebCore/bindings/dart/gyp/scripts/build_dart_snapshot.py
@@ -79,36 +79,12 @@ def main(args):
dartScriptDir = os.path.join(dartPath, 'client', 'dom', 'scripts')
sys.path.insert(0, dartScriptDir)
-
import fremontcutbuilder
- fremontcutbuilder.main()
-
import dartdomgenerator
- dartdomgenerator.GenerateDOM(systems=['native'], output_dir=outputFilePath)
- # FIXME: proper support of enabled features.
- EXCLUDED = [
- 'WebKitMutationObserver',
- 'WebKitCSSFilterValue',
- 'MutationRecord',
- 'HTMLDataListElement',
- 'HTMLPropertiesCollection',
- 'DOMWindowWebAudio',
- 'DOMWindowWebSocket',
- 'Intent',
- 'NavigatorGamepad',
- ]
-
- interfaceNames = []
- idlListFile = open(idlListFileName, 'r')
- for idlFileName in idlListFile:
- if not idlFileName:
- continue
- interfaceName = os.path.splitext(os.path.basename(idlFileName))[0]
- if interfaceName in EXCLUDED:
- continue
- interfaceNames.append(interfaceName)
- idlListFile.close()
+ fremontcutbuilder.main()
+ # FIXME: pass the list of idl files and enabled features to generator.
+ dartdomgenerator.GenerateDOM(systems=['native'], output_dir=outputFilePath)
def write(name, template, **kwargs):
f = open(os.path.join(outputFilePath, name), 'w')
@@ -124,35 +100,6 @@ def main(args):
#import("dart:json", prefix: "json");
''', copyrightTemplate=copyrightTemplate)
-
- # Generate resolver.
- resolverClasses = ['Dart' + interfaceName for interfaceName in interfaceNames if not interfaceName.endswith('Callback')]
-
- def forAllClasses(s):
- return ''.join([s % className for className in resolverClasses])
-
- write('DartResolver.cpp', '''
-%(copyrightTemplate)s
-
-#include "config.h"
-%(includes)s
-
-namespace WebCore {
-
-Dart_NativeFunction snapshotResolver(Dart_Handle name, int argumentCount)
-{
-%(classChecks)s
- return 0;
-}
-
-}
-''', copyrightTemplate=copyrightTemplate,
- includes=forAllClasses('#include "%s.h"\n'),
- classChecks=forAllClasses('''
- if (Dart_NativeFunction func = %s::resolver(name, argumentCount))
- return func;
-'''))
-
# Construct command line to execute the snapshot generator binary and invoke.
def path(*components):
return os.path.abspath(os.path.join(*components))

Powered by Google App Engine
This is Rietveld 408576698