Index: tools/profviz/worker.js |
diff --git a/tools/profviz/worker.js b/tools/profviz/worker.js |
index 60a557f982d0302e75b21ab73269bc33d43f0dda..ae5b3e35985890cf4950c606d11dcb6960a70f6b 100644 |
--- a/tools/profviz/worker.js |
+++ b/tools/profviz/worker.js |
@@ -72,6 +72,12 @@ function load_scripts(scripts) { |
} |
+function log_error(text) { |
+ self.postMessage({"call": "error", "args": text}); |
+ self.postMessage({"call": "reset", "args": text}); |
Jakob Kummerow
2013/09/04 13:34:03
why does "reset" need the text as an arg?
Yang
2013/09/04 13:52:29
you are right. done.
|
+} |
+ |
+ |
function run(args) { |
var file = args["file"]; |
var resx = args["resx"]; |
@@ -121,7 +127,7 @@ function run(args) { |
var input_file_name = "input_temp"; |
var output_file_name = "output.svg"; |
- var psc = new PlotScriptComposer(resx, resy); |
+ var psc = new PlotScriptComposer(resx, resy, log_error); |
var objects = 0; |
time("Collecting events (" + content_lines.length + " entries)", |
@@ -158,10 +164,10 @@ function run(args) { |
var Module = { |
"noInitialRun": true, |
- print: function(text) { |
- self.postMessage({"call": "error", "args": text}); |
+ print: function() { |
Jakob Kummerow
2013/09/04 13:34:03
Y U NO pass in |text| anymore? Maybe you meant:
p
Yang
2013/09/04 13:52:29
I meant to leave it as is. I messed with it, but r
|
+ self.postMessage({"call": "error", "args": text}); |
}, |
- printErr: function(text) { |
- self.postMessage({"call": "error", "args": text}); |
+ printErr: function() { |
+ self.postMessage({"call": "error", "args": text}); |
}, |
}; |