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

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

Issue 15685004: Only update dom.json when executing from go.sh. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 | « no previous file | tools/dom/scripts/go.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/dartdomgenerator.py
diff --git a/tools/dom/scripts/dartdomgenerator.py b/tools/dom/scripts/dartdomgenerator.py
index 1292920219c8acd346039be794fe0f53140e44ab..62be87db8e2f1de4deead52cb417b3bd231e46d3 100755
--- a/tools/dom/scripts/dartdomgenerator.py
+++ b/tools/dom/scripts/dartdomgenerator.py
@@ -49,7 +49,7 @@ def LoadDatabase(database_dir, use_database_cache):
return common_database
def GenerateFromDatabase(common_database, dart2js_output_dir,
- dartium_output_dir):
+ dartium_output_dir, update_dom_metadata):
vsm 2013/05/22 23:21:17 Note, you'll need to update Dartium as well where
blois 2013/05/23 20:26:55 Great catch, I just defaulted to to false.
current_dir = os.path.dirname(__file__)
auxiliary_dir = os.path.join(current_dir, '..', 'src')
template_dir = os.path.join(current_dir, '..', 'templates')
@@ -140,7 +140,9 @@ def GenerateFromDatabase(common_database, dart2js_output_dir,
_logger.info('Flush...')
emitters.Flush()
- metadata.Flush()
+
+ if update_dom_metadata:
+ metadata.Flush()
monitored.FinishMonitoring(dart2js_output_dir)
@@ -175,6 +177,10 @@ def main():
default=False,
help='''Use the cached database from the previous run to
improve startup performance''')
+ parser.add_option('--update-dom-metadata', dest='update_dom_metadata',
+ action='store_true',
+ default=False,
+ help='''Update the metadata list of DOM APIs''')
(options, args) = parser.parse_args()
current_dir = os.path.dirname(__file__)
@@ -199,7 +205,8 @@ def main():
else:
# Load the previously generated database.
database = LoadDatabase(database_dir, options.use_database_cache)
- GenerateFromDatabase(database, dart2js_output_dir, dartium_output_dir)
+ GenerateFromDatabase(database, dart2js_output_dir, dartium_output_dir,
+ options.update_dom_metadata)
if 'htmldart2js' in systems:
_logger.info('Generating dart2js single files.')
« no previous file with comments | « no previous file | tools/dom/scripts/go.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698