mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
module,src: do not wrap modules with -1 lineOffset
Inb799a74709anddfee4e3712the module wrapping mechanism was changed for better error reporting. However, the changes causes issues with debuggers and profilers. This commit reverts the wrapping changes. Fixes: https://github.com/nodejs/node/issues/4297 PR-URL: https://github.com/nodejs/node/pull/4298 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
This commit is contained in:
1 parent
8a0cc6442d
commit
1408f7abb1
3 files changed
+5
-5
No files matched your search
+2
-2
@@ -942,7 +942,7 @@
|
||||
};
|
||||
|
||||
NativeModule.wrapper = [
|
||||
'(function (exports, require, module, __filename, __dirname) {\n',
|
||||
'(function (exports, require, module, __filename, __dirname) { ',
|
||||
'\n});'
|
||||
];
|
||||
|
||||
@@ -952,7 +952,7 @@
|
||||
|
||||
var fn = runInThisContext(source, {
|
||||
filename: this.filename,
|
||||
lineOffset: -1
|
||||
lineOffset: 0
|
||||
});
|
||||
fn(this.exports, NativeModule.require, this, this.filename);
|
||||
|
||||
|
||||
Reference in new issue
Block a user