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

Unified Diff: tools/profviz/profviz.js

Issue 23736004: Add better consistency check and error output to plot script. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 3 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 | « tools/profviz/profviz.html ('k') | tools/profviz/stdio.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/profviz/profviz.js
diff --git a/tools/profviz/profviz.js b/tools/profviz/profviz.js
index 7af12adc7e9b2e684fcaee55aa7ea29d38b92e74..8ac0881eb6fb216f5f20d0385207767575febc58 100644
--- a/tools/profviz/profviz.js
+++ b/tools/profviz/profviz.js
@@ -42,15 +42,6 @@ var worker_scripts = [
function plotWorker() {
var worker = null;
- var delegateList = {
- "log" : log,
- "error" : logError,
- "displayplot" : displayplot,
- "displayprof" : displayprof,
- "range" : setRange,
- "script" : scriptLoaded
- }
-
function initialize() {
ui.freeze();
worker = new Worker("worker.js");
@@ -89,6 +80,16 @@ function plotWorker() {
if (worker) worker.terminate();
initialize();
}
+
+ var delegateList = {
+ "log" : log,
+ "error" : logError,
+ "displayplot" : displayplot,
+ "displayprof" : displayprof,
+ "range" : setRange,
+ "script" : scriptLoaded,
+ "reset" : this.reset
+ }
}
@@ -233,9 +234,6 @@ function start(event) {
function getSelectedFile() {
var file = ui.file.files[0];
if (!file) throw Error("No valid file selected.");
- if (!file.type.toString().match(/text/)) {
- throw Error("'" + escape(file.name) + "' is not a text file.");
- }
return file;
}
« no previous file with comments | « tools/profviz/profviz.html ('k') | tools/profviz/stdio.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698