From 185d490d537bf4be7918856091e54461102f3f0e Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Wed, 10 Aug 2011 22:55:32 -0700 Subject: [PATCH 1/2] Fixed bug with loading the external script --- lib/webworker-child.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/webworker-child.js b/lib/webworker-child.js index 34b3c9f..106339e 100644 --- a/lib/webworker-child.js +++ b/lib/webworker-child.js @@ -132,7 +132,7 @@ ws.addListener('open', function() { var scriptObj = undefined; switch (scriptLoc.protocol) { case 'file': - scriptObj = new script.Script( + scriptObj = new script.NodeScript( fs.readFileSync(scriptLoc.pathname), scriptLoc.href ); From fe246a73f4e6f39189df50e77f0ccd9643e8ded5 Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Wed, 10 Aug 2011 22:59:16 -0700 Subject: [PATCH 2/2] Making node-webworker node v0.5.0 compatible with backwards compatibility --- lib/webworker-child.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/webworker-child.js b/lib/webworker-child.js index 106339e..e83a272 100644 --- a/lib/webworker-child.js +++ b/lib/webworker-child.js @@ -132,7 +132,8 @@ ws.addListener('open', function() { var scriptObj = undefined; switch (scriptLoc.protocol) { case 'file': - scriptObj = new script.NodeScript( + var script_function = script.Script || script.NodeScript; + scriptObj = new script_function( fs.readFileSync(scriptLoc.pathname), scriptLoc.href );