Viewer working with dev version

This commit is contained in:
Artur Adib 2011-10-25 15:43:41 -07:00
parent b049185d51
commit 2e0af76865
4 changed files with 44 additions and 26 deletions

View file

@ -138,6 +138,8 @@ var WorkerProcessorHandler = {
}
};
var consoleTimer = {};
var workerConsole = {
log: function log() {
var args = Array.prototype.slice.call(arguments);
@ -167,3 +169,12 @@ var workerConsole = {
this.log('Timer:', name, Date.now() - time);
}
};
// Worker thread?
if (typeof window === 'undefined') {
console = workerConsole;
// Listen for messages from the main thread.
var handler = new MessageHandler('worker_processor', this);
WorkerProcessorHandler.setup(handler);
}