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

Merging upstream v8.x into xplat-v8.x #258

Merged
merged 196 commits into from
May 23, 2017
Merged

Conversation

kfarnung
Copy link
Contributor

@kfarnung kfarnung commented May 23, 2017

I cherry-picked some changes to resolve build issues that were already fixed in xplat:

And manually fixed one issue:

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

chakrashim, n-api, test

mscdex and others added 30 commits April 26, 2017 09:12
This matches browser behavior.

PR-URL: nodejs/node#12420
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
The eslint-disable comment in test-repl.js appears to have been restored
by accident while restoring other comments. Remove it.

PR-URL: nodejs/node#12659
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
We chose to document this in the docs as there are
different possible behaviours.  Adding this test to validate
that all vm implementations do it the same way.

PR-URL: nodejs/node#12633
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
* Improve UX in 2 code examples (add spaces between output and input
  for better readability).

* Replace indexOf() by startsWith().

PR-URL: nodejs/node#12634
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
adding test coverage for napi_cancel_async_work based
on coverage report

PR-URL: nodejs/node#12575
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Removed common.PORT from test-regress-GH-5051 and
test-regress-GH-5727 in order to eliminate the possibility
of port collision.

Refs: nodejs/node#12376
PR-URL: nodejs/node#12639
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
As indicated by the FIXME comment, this macro guard is no longer needed.

PR-URL: nodejs/node#12638
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
PR-URL: nodejs/node#12629
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
This test would currently create HTTP requests to localhost:80
and would time out on machines that actually had an server listening
there.

To address that, `end()` the requests that are generated.

PR-URL: nodejs/node#12627
Ref: nodejs/node#12494
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Removed common.PORT from test-dgram-close-in-listening,
test-dgram-close-is-not-callback, test-dgram-close,
test-dgram-exclusive-implicit-bind and test-dgram-oob-buffer
in order to eliminate the possibility of port collision.

Refs: nodejs/node#12376
PR-URL: nodejs/node#12623
Reviewed-By: Anna Henningsen <[email protected]>
We should not use hardcoded string to warn users about
file was generated by configure script. Since we already
have do_not_edit variable we can use it

PR-URL: nodejs/node#12610
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Replaced constructor with regular expression for assert.throw().

PR-URL: nodejs/node#12602
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Ref: nodejs/node#12442
PR-URL: nodejs/node#12489
Reviewed-By: Matthew Loring <[email protected]>
Reviewed-By: Julien Gilli <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Expose `node::AddPromiseHook`, which wraps V8’s `SetPromiseHook` in
a way that allows multiple hooks to be set up.

PR-URL: nodejs/node#12489
Reviewed-By: Matthew Loring <[email protected]>
Reviewed-By: Julien Gilli <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Fixes: nodejs/node#10724
PR-URL: nodejs/node#12489
Reviewed-By: Matthew Loring <[email protected]>
Reviewed-By: Julien Gilli <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Commit de168b4 ("src: guard
bundled_ca/openssl_ca with HAVE_OPENSSL") included an incorrect end
macro comment which this commit fixes.

PR-URL: nodejs/node#12688

Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
 - Add a test project to addons-napi that covers the
   N-API reference and external APIs
 - Fix a bug in napi_typeof that was found by the new tests

PR-URL: nodejs/node#12551
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Use of assert must be lazy to allow errors to be used early
before the process is completely set up

PR-URL: nodejs/node#11300
Ref: nodejs/node#11273
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
When test-cli-node-options is run it uses the --trace-events-enabled
option which generates a file named node_trace.1.log. This commit
changes the working directory to the test tmp directory to avoid this
file being created in the project root.

PR-URL: nodejs/node#12660
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Background: To enable N-API support for node versions back to v4, the
N-API code can also be built as an external addon. To make maintenance
easier, a single codebase needs to support both built-in and external
scenarios, along with Node versions >= 4 (and corresponding V8
versions).

This change includes several minor fixes to avoid using node
internal APIs and support older V8 versions:
  - Expand node::arraysize
  - In the CHECK_ENV() macro, return an error code instead of calling
    node::FatalError(). This is more consistent with how other invalid
    arguments to N-API functions are handled.
  - In v8impl::SetterCallbackWrapper::SetReturnValue(), do nothing
    instead of calling node::FatalError(). This is more consistent
    with JavaScript setter callbacks, where any returned value is
    silently ignored.
  - When queueing async work items, get the uv default loop instead of
    getting the loop from node::Environment::GetCurrent(). Currently
    that returns the same loop anyway. If/when node supports multiple
    environments, it should have a public API for getting the
    environment & event loop, and we can update this implementation
    then.
  - Use v8::Maybe::FromJust() instead of the newer alias ToChecked()

PR-URL: nodejs/node#12674
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
PR-URL: nodejs/node#12668
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Replace uses of the pronouns `you` and `your` throughout
the docs + other minor style nits

PR-URL: nodejs/node#12673
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
The fs watch test was not run on AIX till now because of the known
issue, nodejs/node#5085. Now that it is
completed, this guard can be removed.

PR-URL: nodejs/node#12687
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Brian White <[email protected]>
This commit refactors test-whatwg-url-tojson.js to remove
ESLint comments.

PR-URL: nodejs/node#12669
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
PR-URL: nodejs/node#12669
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Add specifics as to the level of hardware supported for
power platforms.  Power 8 is the first processor level to
support ppc little endian.  Set the minimum level
for AIX to Power7 for Node version 8 and later.
This will allow the potential to leverage new instructions
and optimizations going forward.  We have spoken to the
AIX team and they agree this makes sense. Earlier processor
levels will continue to be supported for version 4.x and 6.x
on AIX.

PR-URL: nodejs/node#12679
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
PR-URL: nodejs/node#12683
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
PR-URL: nodejs/node#12683
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Add the initial documentation for the N-API

This PR is a result of work in the abi-stable-node repo:
https://github.com/nodejs/abi-stable-node/tree/doc,
with this PR being the cumulative work on the documentation
sections in that repo with the following contributors
in alphabetical order:

Author: Arunesh Chandra <[email protected]>
Author: Gabriel Schulhof <[email protected]>
Author: Hitesh Kanwathirtha <[email protected]>
Author: Jason Ginchereau <[email protected]>
Author: Michael Dawson <[email protected]>
Author: Sampson Gao <[email protected]>
Author: Taylor Woll <[email protected]>

PR-URL: nodejs/node#12549
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
addaleax and others added 14 commits May 9, 2017 14:30
Backport new virtual methods from
99743ad460e (“[wasm] Transferrable modules”).

Ref: https://codereview.chromium.org/2748473004
Ref: v8/v8@99743ad460e

PR-URL: nodejs/node#12875
Reviewed-By: James M Snell <[email protected]>
Backport removed methods from 6226576efa82ee (“[wasm] Deleted old way
of checking embedder limits on wasm size.”).

Ref: https://codereview.chromium.org/2772203005
Ref: v8/v8@6226576efa82ee

PR-URL: nodejs/node#12875
Reviewed-By: James M Snell <[email protected]>
Backport deprecation of `Context::EstimatedSize()` from
da5b745dba387 (“[api] deprecate unused context size estimate”).

Ref: v8/v8@da5b745

PR-URL: nodejs/node#12875
Reviewed-By: James M Snell <[email protected]>
Backport ABI-incompatible changes from
bf463c4dc080 (“[async-iteration] implement AsyncGenerator”) and
dc662e5b740c (“[inspector] move console to builtins”).

This also requires relaxing one of the V8 unit tests.

Ref: https://chromium-review.googlesource.com/446961
Ref: v8/v8@bf463c4dc080
Ref: https://codereview.chromium.org/2785293002
Ref: v8/v8@dc662e5b740c

PR-URL: nodejs/node#12875
Reviewed-By: James M Snell <[email protected]>
Backport ABI-incompatible changes from
94283dcf4459f (“[ESNext] Implement DynamicImportCall”).

Ref: https://codereview.chromium.org/2703563002
Ref: v8/v8@94283dcf4459f

PR-URL: nodejs/node#12875
Reviewed-By: James M Snell <[email protected]>
Backport API-incompatible changes from
2e4a68733803 (“[v8] v8::StackTrace::AsArray returns correct array”).

Ref: https://codereview.chromium.org/2806373005
Ref: https://github.com/v8/v8/2e4a68733803

PR-URL: nodejs/node#12875
Reviewed-By: James M Snell <[email protected]>
Original commit message:

    Add documentation for FunctionCallbackInfo

    [email protected],[email protected],[email protected]
    BUG=

    Change-Id: I273f5ce305f80b2aa5e9c8c42a6e8e5afc51a0a7
    Reviewed-on: https://chromium-review.googlesource.com/484422
    Reviewed-by: Kentaro Hara <[email protected]>
    Reviewed-by: Toon Verwaest <[email protected]>
    Commit-Queue: Jochen Eisinger <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#44927}

Ref: v8/v8@4fdf9fd4813

PR-URL: nodejs/node#12875
Reviewed-By: James M Snell <[email protected]>
Backport ABI-incompatible changes from
dab18fb0bbcdd (“Make idle tasks optional in the default platform.”).

Ref: https://codereview.chromium.org/2737743002
Ref: v8/v8@dab18fb0bbcdd

PR-URL: nodejs/node#12875
Reviewed-By: James M Snell <[email protected]>
* Added shim for `Promise::Resolver` and some minor additions.
* Skipped several unit test around promises and async hooks

PR-URL: nodejs#245
Reviewed-By: Kyle Farnung <[email protected]>
A new rule was added to enforce function declaration style.

PR-URL: nodejs#247
Reviewed-By: Hitesh Kanwathirtha <[email protected]>
Reviewed-By: Kunal Pathak <[email protected]>
- Reimplement napi_make_callback to call node::MakeCallback
   using V8 (chakrashim) types. We always knew the direct call to
   JsCallFunction() was incorrect there.
 - Re-enable the two tests that were failing due to napi_make_callback

Fixes: nodejs#246
@kfarnung
Copy link
Contributor Author

kfarnung commented May 23, 2017

@kfarnung kfarnung force-pushed the v8.x-merge branch 2 times, most recently from 245e9f5 to 5e26434 Compare May 23, 2017 17:44
The test failure is being tracked by nodejs#246

PR-URL: nodejs#258
Reviewed-By: Hitesh Kanwathirtha <[email protected]>
@kfarnung kfarnung merged commit 31ee0c4 into nodejs:xplat-v8.x May 23, 2017
@kfarnung kfarnung deleted the v8.x-merge branch May 23, 2017 20:58
chakrabot pushed a commit that referenced this pull request Jul 11, 2018
[1.10>master] [MERGE #5418 @kfukuda2] Fixing RegExp parsing for character classes interacting with ranges.

Merge pull request #5418 from kfukuda2:RegExpCharacterClassRangeFix

Fixes #258

Reviewed-By: chakrabot <[email protected]>
chakrabot pushed a commit that referenced this pull request Jul 11, 2018
[MERGE #5418 @kfukuda2] Fixing RegExp parsing for character classes interacting with ranges.

Merge pull request #5418 from kfukuda2:RegExpCharacterClassRangeFix

Fixes #258

Reviewed-By: chakrabot <[email protected]>
kfarnung pushed a commit to kfarnung/node-chakracore that referenced this pull request Jul 11, 2018
[MERGE #5418 @kfukuda2] Fixing RegExp parsing for character classes interacting with ranges.

Merge pull request #5418 from kfukuda2:RegExpCharacterClassRangeFix

Fixes nodejs#258

Reviewed-By: chakrabot <[email protected]>
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.