Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.2.6 proposal #4788

Merged
merged 4 commits into from
Jan 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Node.js ChangeLog

## 2016-01-21, Version 4.2.6 'Argon' (LTS), @TheAlphaNerd

### Notable changes

* Fix regression in debugger and profiler functionality

### Known issues

* Some problems with unreferenced timers running during `beforeExit` are still to be resolved. See [#1264](https://github.com/nodejs/node/issues/1264).
* Surrogate pair in REPL can freeze terminal. [#690](https://github.com/nodejs/node/issues/690)
* Calling `dns.setServers()` while a DNS query is in progress can cause the process to crash on a failed assertion. [#894](https://github.com/nodejs/node/issues/894)
* `url.resolve` may transfer the auth portion of the url when resolving between two full hosts, see [#1435](https://github.com/nodejs/node/issues/1435).

### Commits

* [[`1408f7abb1`](https://github.com/nodejs/node/commit/1408f7abb1)] - **module,src**: do not wrap modules with -1 lineOffset (cjihrig) [#4298](https://github.com/nodejs/node/pull/4298)
* [[`1f8e1472cc`](https://github.com/nodejs/node/commit/1f8e1472cc)] - **test**: add test for debugging one line files (cjihrig) [#4298](https://github.com/nodejs/node/pull/4298)


## 2016-01-20, Version 4.2.5 'Argon' (LTS), @TheAlphaNerd

Maintenance update.
Expand Down
2 changes: 1 addition & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ Module.prototype._compile = function(content, filename) {
var wrapper = Module.wrap(content);

var compiledWrapper = runInThisContext(wrapper,
{ filename: filename, lineOffset: -1 });
{ filename: filename, lineOffset: 0 });
if (global.v8debug) {
if (!resolvedArgv) {
// we enter the repl if we're not given a filename argument.
Expand Down
4 changes: 2 additions & 2 deletions src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@
};

NativeModule.wrapper = [
'(function (exports, require, module, __filename, __dirname) {\n',
'(function (exports, require, module, __filename, __dirname) { ',
'\n});'
];

Expand All @@ -952,7 +952,7 @@

var fn = runInThisContext(source, {
filename: this.filename,
lineOffset: -1
lineOffset: 0
});
fn(this.exports, NativeModule.require, this, this.filename);

Expand Down
2 changes: 1 addition & 1 deletion src/node_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#define NODE_MAJOR_VERSION 4
#define NODE_MINOR_VERSION 2
#define NODE_PATCH_VERSION 6
#define NODE_PATCH_VERSION 7

#define NODE_VERSION_IS_LTS 1
#define NODE_VERSION_LTS_CODENAME "Argon"
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/exports-function-with-param.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = function foo(arg) { return arg; }
18 changes: 18 additions & 0 deletions test/parallel/test-vm-debug-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,24 @@ assert.strictEqual(vm.runInDebugContext(undefined), undefined);
assert.equal(breaks, 1);
})();

// Can set listeners and breakpoints on a single line file
(function() {
const Debug = vm.runInDebugContext('Debug');
const fn = require(common.fixturesDir + '/exports-function-with-param');
let called = false;

Debug.setListener(function(event, state, data) {
if (data.constructor.name === 'BreakEvent') {
called = true;
}
});

Debug.setBreakPoint(fn);
fn('foo');
assert.strictEqual(Debug.showBreakPoints(fn), '(arg) { [B0]return arg; }');
assert.strictEqual(called, true);
})();

// See https://github.com/nodejs/node/issues/1190, fatal errors should not
// crash the process.
var script = common.fixturesDir + '/vm-run-in-debug-context.js';
Expand Down
4 changes: 2 additions & 2 deletions test/sequential/test-module-loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,9 @@ assert.equal(42, require('../fixtures/utf8-bom.js'));
assert.equal(42, require('../fixtures/utf8-bom.json'));

// Error on the first line of a module should
// have the correct line and column number
// have the correct line number
assert.throws(function() {
require('../fixtures/test-error-first-line-offset.js');
}, function(err) {
return /test-error-first-line-offset.js:1:1/.test(err.stack);
return /test-error-first-line-offset.js:1:/.test(err.stack);
}, 'Expected appearance of proper offset in Error stack');