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.
v0.7.4-release
Ryan 2009-07-31 18:49:30 +02:00
parent b27f8ba06d
commit e25afc35bd
1 changed files with 6 additions and 6 deletions

View File

@ -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"+