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

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

Issue 2154863002: Added switch to disable generating cached_patches.dart file (Dartium only). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 c0315df255fab90883a8ec9e92a640a2ef3b1189..6459e45c7e815df2f0d065a30e9a0ab7a70139f6 100755
--- a/tools/dom/scripts/dartdomgenerator.py
+++ b/tools/dom/scripts/dartdomgenerator.py
@@ -287,6 +287,9 @@ def main():
parser.add_option('--gen-interop', dest='dart_js_interop',
action='store_true', default=False,
help='Use Javascript objects (dart:js) accessing the DOM in _blink')
+ parser.add_option('--no-cached-patches', dest='no_cached_patches',
+ action='store_true', default=False,
+ help='Do not generate the sdk/lib/js/cached_patches.dart file')
(options, args) = parser.parse_args()
@@ -346,13 +349,14 @@ def main():
os.path.join(dartium_output_dir, '%s_dartium.dart' % library_name),
os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium'))
- # Blow away the cached_patches.dart needs to be re-generated for Dartium
- # see tools/dartium/generate_patches.sh
- cached_patches_filename = os.path.join('..', '..', '..', 'sdk', 'lib', 'js', 'dartium',
- 'cached_patches.dart')
- cached_patches = open(cached_patches_filename, 'w')
- cached_patches.write(CACHED_PATCHES);
- cached_patches.close()
+ if (not(options.no_cached_patches)):
+ # Blow away the cached_patches.dart needs to be re-generated for Dartium
+ # see tools/dartium/generate_patches.sh
+ cached_patches_filename = os.path.join('..', '..', '..', 'sdk', 'lib', 'js', 'dartium',
+ 'cached_patches.dart')
+ cached_patches = open(cached_patches_filename, 'w')
+ cached_patches.write(CACHED_PATCHES);
+ cached_patches.close()
if '_blink' in systems:
_logger.info('Generating dartium _blink file.')
« 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