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

Side by Side Diff: tools/callstats.py

Issue 1976593002: [tools] Use sandbox in callstats script (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2016 the V8 project authors. All rights reserved. 2 # Copyright 2016 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 ''' 5 '''
6 Usage: runtime-call-stats.py [-h] <command> ... 6 Usage: runtime-call-stats.py [-h] <command> ...
7 7
8 Optional arguments: 8 Optional arguments:
9 -h, --help show this help message and exit 9 -h, --help show this help message and exit
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 user_data_dir = args.user_data_dir 132 user_data_dir = args.user_data_dir
133 else: 133 else:
134 user_data_dir = tempfile.mkdtemp(prefix="chr_") 134 user_data_dir = tempfile.mkdtemp(prefix="chr_")
135 js_flags = "--runtime-call-stats" 135 js_flags = "--runtime-call-stats"
136 if args.replay_wpr: js_flags += " --allow-natives-syntax" 136 if args.replay_wpr: js_flags += " --allow-natives-syntax"
137 if args.js_flags: js_flags += " " + args.js_flags 137 if args.js_flags: js_flags += " " + args.js_flags
138 chrome_flags = [ 138 chrome_flags = [
139 "--no-default-browser-check", 139 "--no-default-browser-check",
140 "--disable-translate", 140 "--disable-translate",
141 "--disable-seccomp-sandbox", 141 "--disable-seccomp-sandbox",
142 "--no-sandbox",
143 "--js-flags={}".format(js_flags), 142 "--js-flags={}".format(js_flags),
144 "--no-first-run", 143 "--no-first-run",
145 "--user-data-dir={}".format(user_data_dir), 144 "--user-data-dir={}".format(user_data_dir),
146 ] 145 ]
147 if args.replay_wpr: 146 if args.replay_wpr:
148 chrome_flags += [ 147 chrome_flags += [
149 "--host-resolver-rules=MAP *:80 localhost:4080, " \ 148 "--host-resolver-rules=MAP *:80 localhost:4080, " \
150 "MAP *:443 localhost:4443, " \ 149 "MAP *:443 localhost:4443, " \
151 "EXCLUDE localhost", 150 "EXCLUDE localhost",
152 "--ignore-certificate-errors", 151 "--ignore-certificate-errors",
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 args.error("use either option --sites-file or site URLs") 528 args.error("use either option --sites-file or site URLs")
530 sys.exit(1) 529 sys.exit(1)
531 elif args.command == "run" and not coexist(args.replay_wpr, args.replay_bin): 530 elif args.command == "run" and not coexist(args.replay_wpr, args.replay_bin):
532 args.error("options --replay-wpr and --replay-bin must be used together") 531 args.error("options --replay-wpr and --replay-bin must be used together")
533 sys.exit(1) 532 sys.exit(1)
534 else: 533 else:
535 args.func(args) 534 args.func(args)
536 535
537 if __name__ == "__main__": 536 if __name__ == "__main__":
538 sys.exit(main()) 537 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698