Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Sync to nodemaster at 7420835 (Oct 4 2016) #142

Merged
merged 272 commits into from
Nov 22, 2016

Conversation

ianwjhalliday
Copy link

Sync to xplat to nodejs/master (2016-10-04) at 7420835

Update chakracore to chakra-core/ChakraCore@0b03604 with TypedArray constructor spec changes to fix various broken test cases.

Skip SharedArrayBuffer tests for node-chakracore.

Sync to more recent nodemaster to follow.

addaleax and others added 30 commits September 11, 2016 20:52
Fix a off-by-one error that made the benchmarks for asynchronous
functions run `n - 1` times instead of `n` times.

PR-URL: nodejs/node#8338
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Brian White <[email protected]>
Add very simple benchmarks for `fs.stat` and `fs.statSync` as
well as `fs.lstat` and `fs.lstatSync` based on the `readdir`
benchmarks.

PR-URL: nodejs/node#8338
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Brian White <[email protected]>
Define the context property r.context.m, not r.m.

PR-URL: nodejs/node#8469
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Add test for `Protocol` object in `_debugger` module. This test covers
some edge cases that fill some coverage gaps in our testing (such as the
"Unknown state" error).

PR-URL: nodejs/node#8454
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
The `crypto.timingSafeEqual` test still seems to be a bit flaky. This
makes a few changes to the test:

* Separates the basic usage and the benchmarking into different tests

* Moves the timing-sensitive benchmark function into a separate module,
and reparses the module on every iteration of the loop to avoid shared
state between timing measurements.

PR-URL: nodejs/node#8456
Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#8281
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
This commit fixes detection of ArrayBuffers from different V8 contexts.
This is especially a problem for environments like nw.js where the
node and browser V8 contexts are not shared.

PR-URL: nodejs/node#8453
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Fixes an error where a loop, used to traverse an array of length `n`,
ran `n + 1` times instead of `n`.

PR-URL: nodejs/node#8420
Reviewed-By: Brian White <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
PR-URL: nodejs/node#8488
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
* Replace var's with const and let
* Replace boolean flags with common.mustCall()
* Using stricter comparisons
* Fixed typo in comment

PR-URL: nodejs/node#8458
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: James M Snell <[email protected]>
We had marked it as flaky but in some failures it hangs
and does not seem to timeout, and or is reported as
an error.

Also add prefix to status file as it was missing.

Also fix name of status file in testcfg.py. It
was pointing to message.status instead of
pseudo-tty.status.

PR-URL: nodejs/node#8470
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
This PR simplifies Server.prototype.listen, removing some redundancy and
inconsistency. Because listen and connect have a similar function signature,
normalizeConnectArgs can be reused for listen.
listenAfterLookup renamed to lookupAndListen for consistency with
lookupAndConnect, and moved out of Server.prototype.listen.

PR-URL: nodejs/node#4039
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Glen Keane <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: nodejs/node#8424
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
* var -> const
* try/catch -> assert.throws()
* assert.ok(fail) -> common.fail()
* assert.equal() -> assert.strictEqual()
* replace `exit` handler with `common.mustCall()`

PR-URL: nodejs/node#8473
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Line 21 used '==' for a Number comparison, changed to '===''.
Lines 36 and 46 used 'assert.equal', changed to 'assert.strictEqual'.
Lines 2, 3 and 4 require statements used var, changed to const.

PR-URL: nodejs/node#8472
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Node todo process example with the follow test-net-binary.js changes:

var --> const where applicable

==, assert.equal--> ===, assert.strictEqual for all cases

PR-URL: nodejs/node#8476
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
ESLint 3.5.0 introduces a `no-restricted-properties` rule. Replace our
custom `no-deepEqual` rule with this rule.

PR-URL: nodejs/node#8478
Reviewed-By: James M Snell <[email protected]>
Clarify a few items in the onboarding doc about landing a PR. One
addition is to include the optional `Refs:` metadata.

PR-URL: nodejs/node#8479
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
* favor ’===’ over in ’==’
* favor ’assert.strictEqual’ over ’assert.equal’
* favor ’const’ over ’var’

PR-URL: nodejs/node#8471
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
`/bin/sh -c` trick wasn't working for several reasons:

* `/bin/sh -c "..."` expects the first argument after `"..."` to be a
  `$0`, not a `$1`. Previously `-n` wasn't passed to `nm` because of
  this, and many symbols were ordered improperly
* `c++filt` was applied not only to the names of the functions but to
  their `nm` prefixes like `t` and `a` (`t xxx` turns into
  `unsigned char xxx`).

Instead of applying `c++filt` wide and using `sh -c`, execute `nm` as
requested by `deps/v8/tools/tickprocessor.js` and apply `c++filt` to all
matching entries manually.

Included test demonstrates where previous approach failed: all builtins
were merged into `v8::internal::Builtins::~Builtins`, because they were
prefixed by `t` in `nm` output.

PR-URL: nodejs/node#8480
Reviewed-By: Matthew Loring <[email protected]>
PR-URL: nodejs/node#8475
Reviewed-By: Brian White <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs/node#8525
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
This commit consolidates the debugging port used by the
inspector and Node's legacy debugger.

Fixes: nodejs/node#8201
PR-URL: nodejs/node#8386
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
Increase time allowed for startup from 1 second to 5 seconds to avoid
occasional flakiness. While at it, refactor a few minor things such as
var->const and using common.mustCall().

Fixes: nodejs/node#8483
PR-URL: nodejs/node#8484
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#8485
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Signed-off-by: Ilkka Myller <[email protected]>

PR-URL: nodejs/node#8530
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
PR-URL: nodejs/node#8533
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
PR-URL: nodejs/node#8489
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
joshgav and others added 12 commits October 3, 2016 14:03
PR-URL: nodejs/node#8727
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
PR-URL: nodejs/node#8726
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
This skips the child-test-uid-gid test when run as root.
Previously, the test failed if executed as root.

PR-URL: nodejs/node#8864
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ilkka Myller <[email protected]>
Teach gtest to produce TAP so we can integrate it better with our CI
tooling.

TAP is printed to stdout but it can also be written to file by passing
the `--gtest_output=tap:filename.tap` switch to cctest.

PR-URL: nodejs/node#8034
Reviewed-By: James M Snell <[email protected]>
Enable the cctests on the CI now that they know how to write TAP output.

PR-URL: nodejs/node#8034
Reviewed-By: James M Snell <[email protected]>
Print size_t and ssize_t using %zd and %zu respectively, not %ld.

PR-URL: nodejs/node#8034
Reviewed-By: James M Snell <[email protected]>
In the 'writing_tests' guide it is recommended to use common.PORT
instead of an arbitrary value, but the recommendation is to use
port 0 instead and the docs should reflect that.

PR-URL: nodejs/node#8694
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Ilkka Myller <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Alphabetized list of methods and properties for the common.js module.
Add table of contents to the top of the readme.

PR-URL: nodejs/node#8840
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Previously `TLSSocket#_emitTLSError` was used as an `error` event
handler. However that function can emit `error` event itself, so it is
not suitable for such use. Luckily the event can be emitted only when
the control is released, so this looping-error can't happen.

Replace the error handler for clarity and correctness.

PR-URL: nodejs/node#8889
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Removes use of builtins that are unavailable for older clang. Per
benchmarks, only uses builtins on Windows, where speedup is
significant.

Also adds test for unaligned ucs2 buffer write. Between #3410
and #7645, bytes were swapped twice on bigendian platforms if buffer
was not two-byte aligned. See comment in #7645.

PR-URL: nodejs/node#7645
Fixes: nodejs/node#7618
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sync to nodejs/master (2016-10-04) at
7420835
SharedArrayBuffer is experimental. Chakrashim does not support it yet.

Synced the chakrashim v8 version header.
@ianwjhalliday
Copy link
Author

Next sync will be to nodejs v7.1.x and come in shortly

@@ -1,4 +1,5 @@
ReferenceError: 'undefined_reference_error_maker' is undefined
at Anonymous function (*test*message*timeout_throw.js:*:*)
at ontimeout (timers.js:*:*)
Copy link
Member

@kunalspathak kunalspathak Nov 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you know why there is difference? I mean is this difference also in nodev8?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we are now matching V8 but would be good to understand why was ontimeout function not in call stack before.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just a refactoring in lib/timers.js. A new timeout method was introduced before calling the user callback.

@kunalspathak
Copy link
Member

Next sync will be to nodejs v7.1.x

and not to nodejs/node's master branch?

@agarwal-sandeep
Copy link
Contributor

commit 638860b title should be <= 50 characters

@agarwal-sandeep
Copy link
Contributor

Rest looks good to me

@joaocgreis
Copy link
Member

CI: https://ci.nodejs.org/view/All/job/chakracore-test-windows/25/

For some reason, it cannot find ChakraCore.h. Possibly something not being transferred from compile to test servers, I'll take a look.

@kunalspathak
Copy link
Member

For some reason, it cannot find ChakraCore.h.

This seemed to have failed earlier as well.

@ianwjhalliday
Copy link
Author

@kunalspathak

Next sync will be to nodejs v7.1.x

and not to nodejs/node's master branch?

It will be v7.1.x from nodejs/node/master (e.g. nodejs/node@9314886)

@kunalspathak
Copy link
Member

LGTM.

Ian Halliday added 2 commits November 21, 2016 12:50
Call stack of expected thrown error changed after updating to recent
nodejs/master.  Update the baseline accordingly.
@ianwjhalliday
Copy link
Author

@agarwal-sandeep

commit 638860b title should be <= 50 characters

I moved the long commit ref from the title to the body and rebased.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.