worker fails on firefox because it refuses to clone objects containing function props

This commit is contained in:
nightwing 2011-10-04 22:43:26 +05:00
commit e0c9179730

View file

@ -158,12 +158,11 @@ var WorkerClient = function(topLevelNamespaces, packagedJs, module, classname) {
this.emit = function(event, data) { this.emit = function(event, data) {
try { try {
this.$worker.postMessage({event: event, data: data}); // firefox refuses to clone objects which have function properties
} // TODO: cleanup event
catch(ex) { this.$worker.postMessage({event: event, data: {data: data.data}});
console.log("no worker");
console.trace();
} }
catch(ex) {}
}; };
this.attachToDocument = function(doc) { this.attachToDocument = function(doc) {