From e25afc35bdb7b7b076f1ccba198a66e05921fb28 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 31 Jul 2009 18:49:30 +0200 Subject: [PATCH] Hack to fix module line numbers in stack traces. This code is going to be refactored with the introduction of the "process" object. This is just temporary. --- src/node.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/node.js b/src/node.js index 61fa5bc255..1716e4b0bc 100644 --- a/src/node.js +++ b/src/node.js @@ -82,12 +82,12 @@ node.Module.prototype.load = function (callback) { self.target.__include = function (path) { self.newChild(path, self.target); }; // create wrapper function - var wrapper = "function (__filename) {\n"+ - " var onLoad;\n"+ - " var onExit;\n"+ - " var exports = this;\n"+ - " var require = this.__require;\n"+ - " var include = this.__include;\n"+ + var wrapper = "function (__filename) { "+ + " var onLoad; "+ + " var onExit; "+ + " var exports = this; "+ + " var require = this.__require; "+ + " var include = this.__include; "+ content+ "\n"+ " this.__onLoad = onLoad;\n"+