small worker fixes

This commit is contained in:
Fabian Jakobs 2011-02-02 18:11:03 +01:00
commit cdf6a08be5
2 changed files with 3 additions and 1 deletions

View file

@ -19,9 +19,10 @@ var require = function(id) {
var chunks = id.split("/");
chunks[0] = require.tlns[chunks[0]] || chunks[0];
path = require.baseUrl + "/" + chunks.join("/") + ".js"
path = /*require.baseUrl + "/" +*/ chunks.join("/") + ".js"
require.id = id;
// console.log("require " + path + " " + id)
importScripts(path);
return require(id);
};

View file

@ -42,6 +42,7 @@ var WorkerClient = function(baseUrl, topLevelNamespaces, packagedJs, module, cla
var _self = this;
this.$worker.onerror = function(e) {
console.log(e);
throw e;
};
this.$worker.onmessage = function(e) {