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

Unified Diff: tools/gypv8sh.py

Issue 594603003: Infrastructure for reading V8's initial snapshot from external files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 6 years, 2 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 | « third_party/android_webview_glue/android_webview_glue_common.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gypv8sh.py
diff --git a/tools/gypv8sh.py b/tools/gypv8sh.py
index 3f81a8bc94c280e2eae9c835d0a25cdd17002ba1..9724ed4b1a6ed12b2b68a91748e049f231ba0e6f 100755
--- a/tools/gypv8sh.py
+++ b/tools/gypv8sh.py
@@ -26,6 +26,8 @@ def main ():
parser.add_option('--deps_js', action="store",
help=("Path to deps.js for dependency resolution, " +
"optional."))
+ parser.add_option('--external', action='store',
+ help="Load V8's initial snapshot from external files (y/n)")
(opts, args) = parser.parse_args()
if len(args) != 9:
@@ -36,6 +38,12 @@ def main ():
icudatafile = os.path.join(os.path.dirname(v8_shell), 'icudtl.dat')
if os.path.exists(icudatafile):
cmd.extend(['--icu-data-file=%s' % icudatafile])
+ v8nativesfile = os.path.join(os.path.dirname(v8_shell), 'natives_blob.bin')
+ if opts.external == 'y' and os.path.exists(v8nativesfile):
+ cmd.extend(['--natives_blob=%s' % v8nativesfile])
+ v8snapshotfile = os.path.join(os.path.dirname(v8_shell), 'snapshot_blob.bin')
+ if opts.external == 'y' and os.path.exists(v8snapshotfile):
+ cmd.extend(['--snapshot_blob=%s' % v8snapshotfile])
arguments = [js2webui, inputfile, inputrelfile, opts.deps_js,
cxxoutfile, test_type]
cmd.extend(['-e', "arguments=" + json.dumps(arguments), mock_js,
« no previous file with comments | « third_party/android_webview_glue/android_webview_glue_common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698