profile
viewpoint
Gabriel Schulhof gabrielschulhof Intel Corporation Santa Clara, California, USA He/Him.

gabrielschulhof/bindings-principles 13

Writing Node.js Bindings - Basic Principles

gabrielschulhof/abi-stable-node-addon-examples 4

Node Add-on Examples with PoC ABI stable API for native modules

gabrielschulhof/jerryscript 2

Ultra-lightweight JavaScript engine for the Internet of Things.

gabrielschulhof/abi-stable-node 0

Node with PoC ABI stable API for native modules

gabrielschulhof/aes-js 0

A pure JavaScript implementation of the AES block cipher and all common modes of operation for node.js or web browsers.

gabrielschulhof/api.jquerymobile.com 0

API documentation for jQuery Mobile

gabrielschulhof/apt-source-whitelist 0

Whitelist of apt sources approved for build environments with restricted sudo

gabrielschulhof/bleno 0

A Node.js module for implementing BLE (Bluetooth Low Energy) peripherals

gabrielschulhof/browser-perf-runner 0

Run browser-perf on websites

PR closed nodejs/node

Reviewers
n-api: remove `napi_env::CallIntoModuleThrow` C++ author ready n-api

Give napi_env::CallIntoModule the thrower used by CallIntoModuleThrow as its default second argument. That way we do not need two different methods on napi_env for calling into the addon.

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. --> Re: https://github.com/nodejs/node/pull/33508

+13 -15

5 comments

3 changed files

gabrielschulhof

pr closed time in 3 days

pull request commentnodejs/node

n-api: remove `napi_env::CallIntoModuleThrow`

Landed in 6a1df3b5afc92f438cf84621abd8cda79d9b1b17. @mhdawson you're good to go with https://github.com/nodejs/node/pull/33508 👍

gabrielschulhof

comment created time in 3 days

push eventnodejs/node

Gabriel Schulhof

commit sha 6a1df3b5afc92f438cf84621abd8cda79d9b1b17

n-api: remove `napi_env::CallIntoModuleThrow` Give `napi_env::CallIntoModule` the thrower used by `CallIntoModuleThrow` as its default second argument. That way we do not need two different methods on `napi_env` for calling into the addon. PR-URL: https://github.com/nodejs/node/pull/33570 Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

push time in 3 days

create barnchnodejs/node-addon-api

branch : v1.x-staging

created branch time in 3 days

issue commentnodejs/node

n-api segfault in `v8impl::Reference::FinalizeCallback`

@codebytere it won't crash with Node.js 14.2.0 in debug mode with the package built in debug mode 🙁

I'm wondering if it's https://github.com/nodejs/node/pull/33508 ...

codebytere

comment created time in 3 days

issue commentnodejs/node

n-api segfault in `v8impl::Reference::FinalizeCallback`

@codebytere

diff --git a/binding.gyp b/binding.gyp
index a5f9525..38d6607 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -79,13 +79,13 @@
         ['OS=="win"', {
           'link_settings': {
             'libraries': [
-              '<(module_root_dir)/build/Release/libcmark-gfm.lib'
+              '<(PRODUCT_DIR)/libcmark-gfm.lib'
             ]
           }
         }, {
           'link_settings': {
             'libraries': [
-              '<(module_root_dir)/build/Release/cmark-gfm.a'
+              '<(PRODUCT_DIR)/cmark-gfm.a'
             ]
           }
         }]

makes npm i --debug possible.

codebytere

comment created time in 4 days

issue commentnodejs/node

n-api segfault in `v8impl::Reference::FinalizeCallback`

I was able to run

/node_modules/.bin/mocha test/helper.js test/extensions.test.js

successfully several times in a row. Nevertheless, it reliably dies when running

./node_modules/.bin/mocha test/helper.js test/*.test.js
codebytere

comment created time in 4 days

issue commentnodejs/node

n-api segfault in `v8impl::Reference::FinalizeCallback`

@codebytere can I run the test by hand? Like, node ./something/something/test.js?

codebytere

comment created time in 4 days

pull request commentnodejs/node-addon-api

test: run in both a child process and a worker thread

@legendecas I had to fix the threadsafe_function_sum test because it was quitting before the promise was resolved. Can you please take another look?

gabrielschulhof

comment created time in 4 days

push eventgabrielschulhof/node-addon-api

Gabriel Schulhof

commit sha 9d2c394229619b6214b43a45cb614ba35899bce1

test: fix tsfn sum test The TSFN sum test was not waiting for all TSFN calls to complete before releasing the TSFN completely. The main thread must only release the TSFN and resolve the deferred if all calls have completed.

view details

push time in 4 days

pull request commentnodejs/node-addon-api

test: run in both a child process and a worker thread

@anfilat understood. In that case, that's probably a test case to add to Node.js.core.

gabrielschulhof

comment created time in 4 days

issue commentnodejs/node-addon-api

FATAL ERROR with addon_data.cc test

@anfilat this is reproduced.

anfilat

comment created time in 4 days

pull request commentnodejs/node-addon-api

test: run in both a child process and a worker thread

@anfilat I changed the way we run all tests to run on a worker thread as well as on the main process. I could not reproduce #730. Can you please test this code and tell me if I'm missing anything?

gabrielschulhof

comment created time in 5 days

PR opened nodejs/node-addon-api

Reviewers
test: run in both a child process and a worker thread

Re: https://github.com/nodejs/node-addon-api/issues/730 Signed-off-by: @gabrielschulhof

+55 -37

0 comment

2 changed files

pr created time in 5 days

create barnchgabrielschulhof/node-addon-api

branch : run-tests-in-workers2

created branch time in 5 days

push eventgabrielschulhof/node-addon-api

Michael Dawson

commit sha beccf2145dbff6c7febb16844e95a268f7930bdb

test: fix up delays for array buffer test Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com> PR-URL: https://github.com/nodejs/node-addon-api/pull/737 Refs: https://github.com/nodejs/node-addon-api/issues/735 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

push time in 5 days

push eventgabrielschulhof/node-addon-api

Gabriel Schulhof

commit sha c01179beeff05a183567260ff7022ae4e3ee5d9f

test: run in both a child process and a worker thread This also fixes some errors which we were letting go before: * There was unhandled promise rejection in `threadsafe_function_sum`. * The garbage collector is now asynchronous, so we must wait a while after gc-ing. Re: https://github.com/nodejs/node-addon-api/issues/730 Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>

view details

push time in 5 days

push eventgabrielschulhof/node-addon-api

Jeroen Janssen

commit sha 45cb1d9748d6305598bb2ad27188135e8bbddad3

Correct AsyncProgressWorker link in README (#716) * Correct AsyncProgressWorker link in README

view details

push time in 5 days

create barnchgabrielschulhof/node-addon-api

branch : run-tests-in-workers

created branch time in 5 days

pull request commentnodejs/node

n-api: ensure scope present for finalization

@mhdawson it must also not be used in InvokeCallback because control is coming from JS there (last one on the list above).

mhdawson

comment created time in 5 days

pull request commentnodejs/node

n-api: remove `napi_env::CallIntoModuleThrow`

@addaleax I have made the changes you requested.

gabrielschulhof

comment created time in 5 days

push eventgabrielschulhof/node

Gabriel Schulhof

commit sha 19a518f62527cc4e7da5299207981f9546097f33

restore template argument and remove std::function

view details

Gabriel Schulhof

commit sha 7743f469f675d06884fc9134808ca17dcd4bea7e

derive the type of the throw handler using decltype

view details

push time in 5 days

Pull request review commentnodejs/node

n-api: remove `napi_env::CallIntoModuleThrow`

 struct napi_env__ {     return v8::Just(true);   } -  template <typename T, typename U>-  void CallIntoModule(T&& call, U&& handle_exception) {+  static inline void+  HandleThrow(napi_env env, v8::Local<v8::Value> value) {+    env->isolate->ThrowException(value);+  }+  using ThrowHandler = std::function<void(napi_env, v8::Local<v8::Value>)>;++  template <typename T>+  inline void CallIntoModule(T&& call,+                             ThrowHandler handle_exception = HandleThrow) {

Cool 👍 This is actually more succinct than what I had 🙂

gabrielschulhof

comment created time in 5 days

Pull request review commentnodejs/node

n-api: remove `napi_env::CallIntoModuleThrow`

 struct napi_env__ {     return v8::Just(true);   } -  template <typename T, typename U>-  void CallIntoModule(T&& call, U&& handle_exception) {+  static inline void+  HandleThrow(napi_env env, v8::Local<v8::Value> value) {+    env->isolate->ThrowException(value);+  }+  using ThrowHandler = std::function<void(napi_env, v8::Local<v8::Value>)>;++  template <typename T>+  inline void CallIntoModule(T&& call,+                             ThrowHandler handle_exception = HandleThrow) {

I couldn't get it to build that way 😀 I used std::function because its signature supports [&]. I'll try and see if I can do it differently.

gabrielschulhof

comment created time in 5 days

pull request commentnodejs/node

n-api: ensure scope present for finalization

@mhdawson with https://github.com/nodejs/node/pull/33570 in place it should be a lot easier to write the variant that declares scopes since we won't have as many variations on napi_env::CallIntoModule.

mhdawson

comment created time in 5 days

PR opened nodejs/node

Reviewers
n-api: remove `napi_env::CallIntoModuleThrow` C++ i18n-api

Give napi_env::CallIntoModule the thrower used by CallIntoModuleThrow as its default second argument. That way we do not need two different methods on napi_env for calling into the addon.

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. --> Re: https://github.com/nodejs/node/pull/33508

+15 -15

0 comment

3 changed files

pr created time in 5 days

create barnchgabrielschulhof/node

branch : consistent-call-into-module

created branch time in 5 days

push eventgabrielschulhof/node

Richard Townsend

commit sha 66807e995de9a16b1cfe035f76958a178c381854

tools,gyp: add support for MSVC cross-compilation This change means that GYP can now generate two sets of projects: one exclusively for a host x64 machine and one containing a mix of x64 and Arm targets. The names of host targets are fixed up to end with _host.exe, and any actions involving them are fixed up. This allows compilation of Node on an x64 server for a Windows on Arm target. PR-URL: https://github.com/nodejs/node/pull/32867 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: João Reis <reis@janeasystems.com>

view details

Richard Townsend

commit sha 883355125766e35126006507d1d8a09c149fc71d

build,win: add support for MSVC cross-compilation * Fixes cases in icutools where commands were issued without .exe * Changes to build scripts * Add /fp:strict flag so that MSVC's floating point behaves correctly * Enables marmasm PR-URL: https://github.com/nodejs/node/pull/32867 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: João Reis <reis@janeasystems.com>

view details

Shelley Vohr

commit sha c841f516d530f31328b1f734428561d93bb14f4c

2020-05-19, Version 14.3.0 (Current) Notable changes: async_hooks: * (SEMVER-MINOR) move PromiseHook handler to JS (Stephen Belanger) https://github.com/nodejs/node/pull/32891 cli: * (SEMVER-MINOR) add `--trace-atomics-wait` flag (Anna Henningsen) https://github.com/nodejs/node/pull/33292 fs: * (SEMVER-MINOR) add .ref() and .unref() methods to watcher classes (rickyes) https://github.com/nodejs/node/pull/33134 http: * (SEMVER-MINOR) expose http.validate-header-name/value (osher) https://github.com/nodejs/node/pull/33119 repl: * (SEMVER-MINOR) deprecate repl._builtinLibs (Ruben Bridgewater) https://github.com/nodejs/node/pull/33294 * (SEMVER-MINOR) deprecate repl.inputStream and repl.outputStream (Ruben Bridgewater) https://github.com/nodejs/node/pull/33294 * (SEMVER-MINOR) show reference errors during preview (Ruben Bridgewater) https://github.com/nodejs/node/pull/33282 * (SEMVER-MINOR) improve repl preview (Ruben Bridgewater) https://github.com/nodejs/node/pull/33282 src: * add support for TLA (Gus Caplan) https://github.com/nodejs/node/pull/30370 PR-URL: https://github.com/nodejs/node/pull/33452

view details

Anna Henningsen

commit sha 7c755b06cee4cf3c3e3841fb891670122f50ee24

build: run full test suite in ASAN action Refs: https://github.com/nodejs/node/pull/32776 PR-URL: https://github.com/nodejs/node/pull/33170 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>

view details

Daniel Bevenius

commit sha 61189d3981ef49885f8d98eef2ac0207b6e59f40

src: reduce duplication in RegisterHandleCleanups This commit suggest using a lambda for the RegisterHandlerCleanup calls in RegisterHandleCleanups. The motivation is to reduce some duplication and to make it a little easier to read as all of the calls pass in the same arguments, apart from casting the uv handle. PR-URL: https://github.com/nodejs/node/pull/33421 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: David Carlier <devnexen@gmail.com>

view details

Anna Henningsen

commit sha 0e92ae64f01140bc527b5a02d7f154dca882ef09

worker: fix race condition in node_messaging.cc `AddToIncomingQueue()` relies on `owner_` only being modified with `mutex_` being locked, but in these two places, that didn’t happen. Modify them to use `Detach()` instead, which has the same effect as setting `owner_ = nullptr` here, but does it with proper locking. This race condition probably only shows up in practice when Node.js is compiled in debug mode, because the compiler eliminates the duplicate load in `AddToIncomingQueue()` when compiling with optimizations enabled. PR-URL: https://github.com/nodejs/node/pull/33429 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Pranshu Srivastava

commit sha ee8756760cf788a7a22091613597c03dceeb3e24

http2: comment on usage of `Object.create(null)` Refs: https://github.com/nodejs/node/issues/29829 PR-URL: https://github.com/nodejs/node/pull/33183 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Tobias Nießen

commit sha 1786504afa068b2b6591f23799dadd4e867cc529

doc: fix typos in handle scope descriptions PR-URL: https://github.com/nodejs/node/pull/33267 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

Ethan Arrowood

commit sha 38f444060b0527afe5dccc44ee2db55c73c62e57

doc: add fs.open() multiple constants example PR-URL: https://github.com/nodejs/node/pull/33281 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Antoine du Hamel

commit sha a82001a387afa133590420c98efb6b87ad320bfb

doc: document module.path Refs: https://github.com/nodejs/node/pull/26970 Fixes: https://github.com/nodejs/node/issues/33270 PR-URL: https://github.com/nodejs/node/pull/33323 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

delvedor

commit sha daa65fba7d413691d55051457993405457fa2f41

http: added scheduling option to http agent In some cases, it is preferable to use a lifo scheduling strategy for the free sockets instead of default one, which is fifo. This commit introduces a scheduling option to add the ability to choose which strategy best fits your needs. PR-URL: https://github.com/nodejs/node/pull/33278 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

view details

Daniel Bevenius

commit sha ff016fbd8391883a6bb43d0a661d1baafa33ce86

lib: update executionAsyncId/triggerAsyncId comment This commit updates the comment referring to the executionAsyncId/triggerAsyncId pair being stored in a std::stack. It looks like this was changed from std::stack to AliasedFloat64Array in Commit 83e5215a4e8438a43b9f0002b7a43e2fd2dd37a4 ("async_hooks: use typed array stack as fast path"). PR-URL: https://github.com/nodejs/node/pull/33396 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Ruben Bridgewater

commit sha 3a5158878b910a9e2d61988ef82640db2a50c0ec

util: mark classes while inspecting them This outlines the basic class setup when inspecting a class. Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> PR-URL: https://github.com/nodejs/node/pull/32332 Fixes: https://github.com/nodejs/node/issues/32270 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>

view details

Pranshu Srivastava

commit sha 08308c7111b8accc77092999ad4c8fb63807c1f4

http2: do not modify explicity set date headers Fixes: https://github.com/nodejs/node/issues/30894 Refs: https://github.com/nodejs/node/issues/29829 PR-URL: https://github.com/nodejs/node/pull/33160 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

rickyes

commit sha 1a12b82396c6c0747f8f5c96a28d019f774e0257

fs: refactor the import of internalUtil PR-URL: https://github.com/nodejs/node/pull/33296 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>

view details

Jan Krems

commit sha 6961c7f804cad26b471d5f7c4c92b0861ba19f12

deps: update node-inspect to v2.0.0 Highlights: * Remove use of `process.binding` on modern node (@addaleax) * Increase timeout for port checking (@yilmazdurmaz) * Auto-resume on start when `NODE_INSPECT_RESUME_ON_START` is set (@dolsem) Compare: https://github.com/nodejs/node-inspect/compare/v1.11.6...v2.0.0 PR-URL: https://github.com/nodejs/node/pull/33447 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matheus Marchini <mat@mmarchini.me> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

view details

Anna Henningsen

commit sha d2a6f06dce724d24b0aa3c7a2821e4757002bffc

worker: use _writev in internal communication PR-URL: https://github.com/nodejs/node/pull/33454 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

Daniel Bevenius

commit sha 37b4717728413e174ae3d295c74a5b443ca0d901

src: remove unnecessary else in base_object-inl.h This commit removes two unnecessary else statements in base_object-inl.h. It also tries to make the if statements consistent with regards to braces. PR-URL: https://github.com/nodejs/node/pull/33413 Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>

view details

Shelley Vohr

commit sha 81216a349d902dfef94878de75a6fe7ed1c90d1c

doc: claim ABI version 85 for Electron 11 PR-URL: https://github.com/nodejs/node/pull/33375 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

Michael Dawson

commit sha 4c4c22635927d88eccab495b34564439dbdf50c7

src: prefer make_unique In most of the code base we use make_unique instead of new unique_ptr. Update node_platform.cc to be consistent with that. Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com> PR-URL: https://github.com/nodejs/node/pull/33378 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>

view details

push time in 5 days

pull request commentnodejs/node

n-api: ensure scope present for finalization

So, if we can agree in the two places that we can replace with/add a CallbackScope before the invocation, then we can add a method to napi_env called CallIntoModuleWithScopes that declares them and use that method everywhere.

mhdawson

comment created time in 5 days

PullRequestEvent

PR closed nodejs/node

Reviewers
n-api: ensure scope present for finalization C++

Spent some time looking at https://github.com/nodejs/node-addon-api/pull/729 which was related to a crash during finalization when using node-addon-api ObjectWrap.

I think it should be fixed in core as opposed to node-addon-api as it should be possible to hit the same problem using N-API directly instead of node-addon-api.

It seems to be more subtle than the scope never being in place. The added is the simplest test that causes the problem to recreate when run under debug and without the change adding the scope.

Refs: https://github.com/nodejs/node-addon-api/issues/722

Ensure a scope is on stack during finalization as finalization functions can create JS Objects

Signed-off-by: Michael Dawson michael_dawson@ca.ibm.com

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [X] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [X] tests and/or benchmarks are included
  • [X] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+73 -3

2 comments

4 changed files

mhdawson

pr closed time in 5 days

pull request commentnodejs/node

n-api: ensure scope present for finalization

We could create a version of CallIntoModule and CallIntoModuleThrow that declares these scopes, because currently invocations of CallIntoModule and CallIntoModuleThrow are almost always preceded by scope declarations:

FinalizeBufferCallback precedes the call into the addon with a HandleScope and a ContextScope. @addaleax can we replace the ContextScope with a CallbackScope for consistency with other calls into the addon? https://github.com/nodejs/node/blob/9949a2e1e3100c4ff1f228bac57c1af95cdc3e9d/src/node_api.cc#L57-L65

In TSFN's DispatchOne we already precede the invocation of CallIntoModule with a HandleScope and a CallbackScope: https://github.com/nodejs/node/blob/9949a2e1e3100c4ff1f228bac57c1af95cdc3e9d/src/node_api.cc#L303-L313

The same is true in TSFN's Finalize: https://github.com/nodejs/node/blob/9949a2e1e3100c4ff1f228bac57c1af95cdc3e9d/src/node_api.cc#L318-L324

In napi_module_register_by_symbol we definitely don't need any scopes because we know the call is coming from JS: https://github.com/nodejs/node/blob/9949a2e1e3100c4ff1f228bac57c1af95cdc3e9d/src/node_api.cc#L458-L460

In AfterThreadPoolWork we already precede the invocation with a declaration of HandleScope and CallbackScope. https://github.com/nodejs/node/blob/9949a2e1e3100c4ff1f228bac57c1af95cdc3e9d/src/node_api.cc#L858-L871

This is the one you want to change. Would it be expensive if we declared both a HandleScope and a CallbackScope, thereby making it consistent with the other invocations where we need both? https://github.com/nodejs/node/blob/9949a2e1e3100c4ff1f228bac57c1af95cdc3e9d/src/js_native_api_v8.cc#L270-L276

In InvokeCallback we definitely don't need any scopes because we know the call is coming from JS: https://github.com/nodejs/node/blob/9949a2e1e3100c4ff1f228bac57c1af95cdc3e9d/src/js_native_api_v8.cc#L478-L480

mhdawson

comment created time in 5 days

pull request commentnodejs/node

Revert "n-api: detect deadlocks in thread-safe function"

@addaleax like so (still running the tests locally, so no PR yet).

addaleax

comment created time in 12 days

create barnchgabrielschulhof/node

branch : use-thread-local-env

created branch time in 12 days

push eventgabrielschulhof/node

Nikolai Vavilov

commit sha c17dcb32533aa007dfbf507d22c28ef3c7c11c29

doc: fix style and grammer in buffer.md PR-URL: https://github.com/nodejs/node/pull/33194 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

John Leidegren

commit sha 26f150022f9b4d4709c1d4ad450c6f9e9fce8d0e

http: fixes memory retention issue with FreeList and HTTPParser Fixes: https://github.com/nodejs/node/issues/29394 Refs: https://github.com/nodejs/node/pull/33167#issuecomment-622102450 PR-URL: https://github.com/nodejs/node/pull/33190 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>

view details

Myles Borins

commit sha 1ffd182264dcf02e010aae3dc88406c2db9efcfb

doc: explicitly doc package.exports is breaking If package authors don't explicitly include all previously supported entry points introducing package.exports will be a Semver-Major change. Add a warning about this behavior and offer two potential solutions for module authors. Refs: https://github.com/then/is-promise/issues/20 PR-URL: https://github.com/nodejs/node/pull/33074 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Michaël Zasso

commit sha f446b2058dcfaf9d4e2f6bdfe555bc4437f41acf

2020-05-05, Version 14.2.0 (Current) Notable changes: * Track function calls with `assert.CallTracker` (experimental). https://github.com/nodejs/node/pull/31982 * Added a `groupIndentation` option to the `Console` constructor. https://github.com/nodejs/node/pull/32964 PR-URL: https://github.com/nodejs/node/pull/33232

view details

Joyee Cheung

commit sha 86fdaa745572a3bec4370ac7bd05d18e6bf64c01

src: retrieve binding data from the context Instead of passing them through the data bound to function templates, store references to them in a list embedded inside the context. This makes the function templates more context-independent, and makes it possible to embed binding data in non-main contexts. Co-authored-by: Anna Henningsen <anna@addaleax.net> PR-URL: https://github.com/nodejs/node/pull/33139 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

view details

Richard Lau

commit sha a22991b04461a1aa8dd6e1793f26f3b9e6eaaa27

Revert "src: add aliased-buffer-overflow abort test" This reverts commit babeb58c5286c55f00e6dfc48c0b609314bcc381. PR-URL: https://github.com/nodejs/node/pull/33196 Refs: https://github.com/nodejs/node/pull/31740 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

Richard Lau

commit sha 120d7076d5462f7f664ed0c92be26541e3298a24

Revert "src: add test/abort build tasks" This reverts commit e08ac095690015a8c488e05251e05feb2acc57a0. PR-URL: https://github.com/nodejs/node/pull/33196 Refs: https://github.com/nodejs/node/pull/31740 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

James M Snell

commit sha 1dc006ef1990d4dcb67a9521bc643638aeba248b

src: use BaseObjectPtr in StreamReq::Dispose Allow the AsyncWrap to be properly detached. Extracted from the [QUIC PR](https://github.com/nodejs/node/pull/32379). Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/33102 Refs: https://github.com/nodejs/node/pull/32379/files?file-filters%5B%5D=.bat&file-filters%5B%5D=.gyp&file-filters%5B%5D=.gypi&file-filters%5B%5D=.h&file-filters%5B%5D=.md&file-filters%5B%5D=.py&file-filters%5B%5D=.sh&file-filters%5B%5D=No+extension&file-filters%5B%5D=dotfile#r409084763 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

James M Snell

commit sha 548439a530c797eb1be877978d5a03f1ee90bc7c

doc: doc and test URLSearchParams discrepancy The WHATWG URL spec is not going to change this behavior so let's document it Signed-off-by: James M Snell <jasnell@gmail.com> Fixes: https://github.com/nodejs/node/issues/33037 PR-URL: https://github.com/nodejs/node/pull/33236 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>

view details

Michael Dawson

commit sha 3662b0c2c75b670599c363be8322064a3359e432

doc: update napi_async_init documentation Fixes: https://github.com/nodejs/node/issues/33153 Change documentation to make async_resource required as opposed to optional in napi-async_init. Changes over time mean this parameter is required for proper operation of async hooks (which are still experimental). This changes the documentation to document what callers should do. We are doing this only in the doc in order to avoid a breaking change in N-API. We could create a new version of the method for which the parametrer is enforced as mandatory but we should only do that once async hooks is no longer experimental. In that case we could deprecate (but not remove this version of the method). Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com> PR-URL: https://github.com/nodejs/node/pull/33181 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

view details

Robert Nagy

commit sha 8607f9ec5c2a488f5df7f9eb3e5f5c7dfa0b492a

stream: make from read one at a time Currently from will eagerly buffer up items which means that errors are also eagerly encountered and items which are buffer when an error occurs will be discarded, which is inconsistent with how generators work. Fixes: https://github.com/nodejs/node/issues/29428 PR-URL: https://github.com/nodejs/node/pull/33201 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

Gabriel Schulhof

commit sha e454e9b33f2a3e21d0c36a96d47cf39ce3e42d6c

n-api: add uint32 test for -1 Adds a test to ensure that napi_get_value_uint32 returns 0xffffffff for -1. Re: https://github.com/nodejs/node/issues/33117 Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>

view details

James M Snell

commit sha baba42c38bbda5225e09147fe4a869fa4a4a1110

doc: add warnings about transferring Buffers and ArrayBuffer Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/33252 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Mathias Buus <mathiasbuus@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Andrey Pechkurov

commit sha dab51dddc8b928a67ad35e93ab2b8f6458fdb8c1

doc: remove AsyncWrap mentions from async_hooks.md AsyncWrap is a private API and should not be mentioned in the documentation. PR-URL: https://github.com/nodejs/node/pull/33249 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Andrey Pechkurov

commit sha fedb0f4d54e8e68d39f488969d074773f7f95ffb

doc: add troubleshooting guide for AsyncLocalStorage PR-URL: https://github.com/nodejs/node/pull/33248 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>

view details

Tobias Nießen

commit sha c01544de1f0ed033327861d65ddb5cb94ea1fb94

wasi: prevent syscalls before start PR-URL: https://github.com/nodejs/node/pull/33235 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Simen Bekkhus

commit sha 5424f1b8443c639145fb9d8c76d6d8358a2c1fd8

doc: specify unit of time passed to `fs.utimes` PR-URL: https://github.com/nodejs/node/pull/33230 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Juan José Arboleda

commit sha 3f1e65dd7be9c55a879ec9d7190de5c7401c66e0

doc: fix md issue in src/README.md PR-URL: https://github.com/nodejs/node/pull/33224 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>

view details

Pranshu Srivastava

commit sha 280c485d36badbe38f4c00126c0b9b83abf923c2

doc: add Uint8Array to `end` and `write` PR-URL: https://github.com/nodejs/node/pull/33217 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>

view details

himself65

commit sha f153081d26ea6cb699fff418151de5f469baed52

module: lazy load 'getOptionValue' in initializeLoader This enables loading this module during early bootstrapping. PR-URL: https://github.com/nodejs/node/pull/33212 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>

view details

push time in 12 days

pull request commentnodejs/node

Revert "n-api: detect deadlocks in thread-safe function"

I mean, instead of v8::Isolate::GetCurrent()?

addaleax

comment created time in 12 days

issue commentnodejs/node-addon-api

Can we use Client Stub Generated by MIDL compiler to Connect To Windows RPC Server

@contradictionary if you wish to use the DLL from Node.js, you have to write Node.js bindings for the native functions it provides. There are two ways of doing that:

  1. If you are "in control" of the DLL, meaning you have the source code and are able to build it yourself, you can add bindings to it and it will become a Node.js addon.

  2. If you do not have the source code for it, you can still link to it from a newly created Node.js addon by including the corresponding .lib in the binding.gyp file responsible for building the Node.js addon.

contradictionary

comment created time in 13 days

issue closednodejs/node-addon-api

Ports not opening

I have this code

function CreateWebServer() {
	http.post("/growtopia/server_data.php", function(req, res) {
		setTimeout(() => {
			res.send(`server|127.0.0.1\nport|17091\ntype|1\n#maint|Mainetrance message (Not used for now) -- NodeJS-GTPS\n\nbeta_server|127.0.0.1\nbeta_port|17091\n\nbeta_type|1\nmeta|localhost\nRTENDMARKERBS1001`)
		}, 750)
	});

	http.start(80)
	.then(() => console.log(`Growtopia webserver started at port 80`))
}

CreateWebServer()

setTimeout(() => {
  HostHandler.start()
}, 5000);

but i was wandering, why is only one being ran? It's not logging the webserver started. HostHandler.start() is the cpp binding that opens a server with enet on c++ side, while http is restana.

closed time in 13 days

Alexander9673

issue commentnodejs/node-addon-api

Ports not opening

@Alexander9673 a native addon does not seem to be involved in the code you posted. If you are having issues with Node.js' HTTP server, please create a new issue in the Node.js core repository at

https://github.com/nodejs/node/issues/new

Alexander9673

comment created time in 13 days

issue closednodejs/node

napi_get_value_uint32 difference between Node 14 and previous

Hi,

In sodium-native we have a special malloc that allows you to allocated a mmap'ed buffer with special flags that provide extra protection. The signature is sodium_malloc(bytes) where bytes can be up to 0xffffffff. Until Node 14 napi_get_value_uint32 would fail for numbers outside this range (eg. -1 or Number.MAX_SAFE_INTEGER) but for Node 14 our tests now fail with varying errors on different operating system. My guess is that in Node 14, this wraps around, but it is unspecified by the napi docs whether wrap around does happen, so we might have relied on undefined behaviour.

Here is our failing tests: https://github.com/sodium-friends/sodium-native/blob/91e28b44648164ba8054f22e9a96c826329462bd/test/memory.js#L117-L125

Here is the macro we use to read a uint32_t from a Number: https://github.com/sodium-friends/sodium-native/blob/91e28b44648164ba8054f22e9a96c826329462bd/macros.h#L157-L161

closed time in 13 days

emilbayes

issue commentnodejs/node

napi_get_value_uint32 difference between Node 14 and previous

@emilbayes I have added a test to ensure that the behaviour remains consistent going forward. Please re-open if you believe that the problem lies within Node.js.

emilbayes

comment created time in 13 days

issue commentnodejs/node-addon-api

Make next release semver-major/Request for 2.x release with backports

Maybe we should check master against 10.15.2 as well.

gabrielschulhof

comment created time in 13 days

Pull request review commentnodejs/node

Revert "n-api: detect deadlocks in thread-safe function"

 napi_call_threadsafe_function(napi_threadsafe_function func,   `napi_tsfn_nonblocking` to indicate that the call should return immediately   with a status of `napi_queue_full` whenever the queue is full. -This API will return `napi_would_deadlock` if called with `napi_tsfn_blocking`-from the main thread and the queue is full.- This API will return `napi_closing` if `napi_release_threadsafe_function()` was
This API should not be called with `napi_tsfn_blocking` from a JavaScript
thread, because, if the queue is full, it may cause the JavaScript thread to
deadlock.

This API will return `napi_closing` if `napi_release_threadsafe_function()` was
addaleax

comment created time in 13 days

Pull request review commentnodejs/node

Revert "n-api: detect deadlocks in thread-safe function"

 preventing data from being successfully added to the queue. If set to `napi_call_threadsafe_function()` never blocks if the thread-safe function was created with a maximum queue size of 0. -As a special case, when `napi_call_threadsafe_function()` is called from a-JavaScript thread, it will return `napi_would_deadlock` if the queue is full-and it was called with `napi_tsfn_blocking`. The reason for this is that the-JavaScript thread is responsible for removing items from the queue, thereby-reducing their number. Thus, if it waits for room to become available on the-queue, then it will deadlock.--`napi_call_threadsafe_function()` will also return `napi_would_deadlock` if the-thread-safe function created on one JavaScript thread is called from another-JavaScript thread. The reason for this is to prevent a deadlock arising from the-possibility that the two JavaScript threads end up waiting on one another,-thereby both deadlocking.- The actual call into JavaScript is controlled by the callback given via the
`napi_call_threadsafe_function()` should not be called with `napi_tsfn_blocking`
from a JavaScript thread, because, if the queue is full, it may cause the
JavaScript thread to deadlock.

The actual call into JavaScript is controlled by the callback given via the
addaleax

comment created time in 13 days

pull request commentnodejs/node

Revert "n-api: detect deadlocks in thread-safe function"

How can you detect whether you are on a JS thread or not without knowing a priori that you are on a JS thread? Is there a way of finding out whether an isolate is active on the current thread without calling v8::Isolate::GetCurrent()?

addaleax

comment created time in 13 days

pull request commentnodejs/node-addon-api

[v2.x] Backport ObjectWrap reference-related changes

@addaleax PTAL. I pointed out the changes introduced by the commit that is not a cherry-pick.

gabrielschulhof

comment created time in 16 days

Pull request review commentnodejs/node-addon-api

[v2.x] Backport ObjectWrap reference-related changes

 struct AccessorCallbackData { // Module registration //////////////////////////////////////////////////////////////////////////////// -#define NODE_API_MODULE(modname, regfunc)                 \-  napi_value __napi_ ## regfunc(napi_env env,             \-                                napi_value exports) {     \-    return Napi::RegisterModule(env, exports, regfunc);   \-  }                                                       \+#define NODE_API_MODULE(modname, regfunc)                      \+  namespace Napi {                                             \+    namespace details {                                        \+      std::atomic_bool needs_objectwrap_destructor_fix(false); \+    }                                                          \+  }                                                            \

This is a new change, not part of any cherry-pick.

gabrielschulhof

comment created time in 16 days

Pull request review commentnodejs/node-addon-api

[v2.x] Backport ObjectWrap reference-related changes

 inline ObjectWrap<T>::ObjectWrap(const Napi::CallbackInfo& callbackInfo) {   napi_value wrapper = callbackInfo.This();   napi_status status;   napi_ref ref;-  T* instance = static_cast<T*>(this);-  status = napi_wrap(env, wrapper, instance, FinalizeCallback, nullptr, &ref);+  status = napi_wrap(env, wrapper, this, FinalizeCallback, nullptr, &ref);   NAPI_THROW_IF_FAILED_VOID(env, status); -  Reference<Object>* instanceRef = instance;+  Reference<Object>* instanceRef = this;   *instanceRef = Reference<Object>(env, ref); } -template<typename T>-inline ObjectWrap<T>::~ObjectWrap() {}+template <typename T>+inline ObjectWrap<T>::~ObjectWrap() {+  // If the JS object still exists at this point, remove the finalizer added+  // through `napi_wrap()`.+  if (!IsEmpty()) {+    Object object = Value();+    // It is not valid to call `napi_remove_wrap()` with an empty `object`.+    // This happens e.g. during garbage collection.+    if (!object.IsEmpty() && _construction_failed) {+      napi_remove_wrap(Env(), object, nullptr);++      if (Napi::details::needs_objectwrap_destructor_fix) {+        // If construction failed we delete the reference via+        // `napi_remove_wrap()`, not via `napi_delete_reference()` in the+        // `Reference<Object>` destructor. This will prevent the+        // `Reference<Object>` destructor from doing a double delete of this+        // reference.+        _ref = nullptr;+        _env = nullptr;+      }

This is a new change, not part of any cherry-pick.

gabrielschulhof

comment created time in 16 days

Pull request review commentnodejs/node-addon-api

[v2.x] Backport ObjectWrap reference-related changes

 struct AccessorCallbackData { inline napi_value RegisterModule(napi_env env,                                  napi_value exports,                                  ModuleRegisterCallback registerCallback) {+  const napi_node_version* nver = Napi::VersionManagement::GetNodeVersion(env);+  Napi::details::needs_objectwrap_destructor_fix =+    (nver->major < 10 ||+      (nver->major == 10 && nver->minor < 15) ||+      (nver->major == 10 && nver->minor == 15 && nver->patch < 3));+

This is a new change, not part of any cherry-pick

gabrielschulhof

comment created time in 16 days

Pull request review commentnodejs/node-addon-api

[v2.x] Backport ObjectWrap reference-related changes

 namespace Napi { // Helpers to handle functions exposed from C++. namespace details { +extern std::atomic_bool needs_objectwrap_destructor_fix;+

This is a new change, not part of any cherry-pick.

gabrielschulhof

comment created time in 16 days

Pull request review commentnodejs/node-addon-api

[v2.x] Backport ObjectWrap reference-related changes

 // Note: Do not include this file directly! Include "napi.h" instead.  #include <algorithm>+#include <atomic>

This is a new change, not part of any cherry-pick.

gabrielschulhof

comment created time in 16 days

create barnchgabrielschulhof/node-addon-api

branch : fix-segv-on-8

created branch time in 16 days

push eventgabrielschulhof/node-addon-api

Gabriel Schulhof

commit sha 31be7792c485d7ec685a3809f4361bc2de544dad

objectwrap: avoid double-free on old Node.js On Node.js versions earlier than 10.15.3 references were being cleaned up differently. This has resulted in a segfault because of a double free when the `ObjectWrap<T>` subclass constructor throws. We need a fix that only runs on Node.js < 10.15.3. We use `Napi::VersionManagement::GetNodeVersion()` at addon load time to determine whether we need the workaround. We store the result in an atomic boolean and consult its value whenever we destroy an `ObjectWrap<T>` instance.

view details

push time in 16 days

pull request commentnodejs/node-addon-api

[v2.x] Backport ObjectWrap reference-related changes

@addaleax I think it's safe to assume C++11.

gabrielschulhof

comment created time in 16 days

pull request commentnodejs/node-addon-api

[v2.x] Backport ObjectWrap reference-related changes

@addaleax no, but it should at least be assigned in a thread-safe fashion.

gabrielschulhof

comment created time in 16 days

pull request commentnodejs/node-addon-api

[v2.x] Backport ObjectWrap reference-related changes

@addaleax I started implementing it but then I realized that we cannot just call Napi::VersionManagement::GetNodeVersion() from the destructor because that would slow down the destructor which can, after all, be called quite often if its instances are created/destroyed in a tight loop. We'd have to store the result once and reduce it to a boolean which evaluates to true only on old versions of Node.js (< 10.15.3, to be precise). That, in turn requires that we store the value somewhere. A global static is not a good option because that would break the whole context-awareness. My best guess would be a global static thread_local.

gabrielschulhof

comment created time in 16 days

pull request commentnodejs/node-addon-api

[v2.x] Backport ObjectWrap reference-related changes

@addaleax the detection would have to happen at runtime because anything built against Node.js 8.x must also run without recompilation on later versions.

gabrielschulhof

comment created time in 19 days

pull request commentnodejs/node-addon-api

[v2.x] Backport ObjectWrap reference-related changes

@addaleax this crashes on Node.js v8.x because we didn't backport the reference tracking changes before it went EOL.

gabrielschulhof

comment created time in 20 days

pull request commentnodejs/node-addon-api

[v2.x] Backport ObjectWrap reference-related changes

@addaleax I actually had to add another commit, also cleanly applied – the one that updates the BigInt test for changes to the expected error message in core – since we're testing 2.x again.

gabrielschulhof

comment created time in 20 days

push eventgabrielschulhof/node-addon-api

Michael Dawson

commit sha e58b770dd469569ec1f7312c89d8fbf8a63a4afd

test: update BigInt test for recent change in core https://github.com/nodejs/node/commit/689ab46c646bc8add5560a606ba73d3760f8f924 changed the expected error for one of the BigInt test cases. This is ok because BigInt is still in experimental. However, the result was a failed/hanging test. See https://github.com/nodejs/build/issues/2131 This changes the test to accept either the new or old behaviour. We need that so that older versions of Node.js will also pass the test until the the node core commit above is backported. PR-URL: https://github.com/nodejs/node-addon-api/pull/649 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com>

view details

push time in 20 days

Pull request review commentnodejs/node

doc: fix typo in n-api.md

 Native addons may need to allocate global state of which they make use during their entire life cycle such that the state must be unique to each instance of the addon. -To this env, N-API provides a way to allocate data such that its life cycle is+To this end, N-API provides a way to allocate data such that its life cycle is

@legendecas it is a typo – though I have to admit, it makes sense even if we don't consider it a typo. I guess it's a pun – unintentionally.

danbev

comment created time in 20 days

pull request commentnodejs/node-addon-api

Backport ObjectWrap reference-related changes

Re https://github.com/nodejs/node-addon-api/issues/646

gabrielschulhof

comment created time in 20 days

issue commentnodejs/node-addon-api

Make next release semver-major/Request for 2.x release with backports

@addaleax to backport 4e88506 we also need to backport 86384f9 and we should also backport the subsequent 7f56a78 which fixes #660.

https://github.com/nodejs/node-addon-api/pull/723

gabrielschulhof

comment created time in 20 days

push eventgabrielschulhof/node-addon-api

Gabriel Schulhof

commit sha ff6a0fd558dd20770a5841e697d6503dc1c2d844

objectwrap: remove wrap only on failure `napi_remove_wrap()` was intended for objects that are alive for which the native addon wishes to withdraw its native pointer, and perhaps replace it with another. Therefore we need not `napi_remove_wrap()` during gc/env-cleanup. It is sufficient to `napi_delete_reference()`, as `Reference<Object>` already does. We need only `napi_remove_wrap()` if the construction failed and therefore no gc callback will ever happen. This change also removes references to `ObjectWrapConstructionContext` from the header because the class is not used anymore. Fixes: https://github.com/nodejs/node-addon-api/issues/660 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Kevin Eady <kevin.c.eady@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

push time in 20 days

delete branch gabrielschulhof/node-addon-api

delete branch : v2.0-staging

delete time in 20 days

push eventgabrielschulhof/node-addon-api

Nicola Del Gobbo

commit sha 187318e37f4a81f1b0f9f414e86f16dd0dc75748

doc: Removed references to Node.js lower than 10.x. (#709) * Removed references to Node.js lower than 10.x.

view details

NickNaso

commit sha 081cdc2f732ce759df777ffd69e0b4c2bd318b0d

Prepare release 3.0.0.

view details

Gabriel Schulhof

commit sha 381c0da60c99b3bc845767142629a036145eff32

doc: add instance data APIs Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> Re: https://github.com/nodejs/node-addon-api/issues/567#issuecomment-619478767 PR-URL: https://github.com/nodejs/node-addon-api/pull/708 Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

view details

push time in 20 days

created taggabrielschulhof/node-addon-api

tag3.0.0

created time in 20 days

create barnchgabrielschulhof/node-addon-api

branch : backport-4e885069-pr-475

created branch time in 20 days

create barnchgabrielschulhof/node-addon-api

branch : v2.x-staging

created branch time in 20 days

create barnchnodejs/node-addon-api

branch : v2.x-staging

created branch time in 20 days

PR closed nodejs/node

src: clean up large pages code C++
  • Initialize structure members.
  • Factor out common Debug() prefix.
  • Remove unused text_region field.

Signed-off-by: @gabrielschulhof

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+14 -19

2 comments

1 changed file

gabrielschulhof

pr closed time in 24 days

pull request commentnodejs/node

src: clean up large pages code

Landed in fdfb98b61987679c24700bcfbc5710f651b89332.

gabrielschulhof

comment created time in 24 days

push eventnodejs/node

Gabriel Schulhof

commit sha fdfb98b61987679c24700bcfbc5710f651b89332

src: clean up large pages code * Initialize structure members. * Factor out common `Debug()` prefix. * Remove unused `text_region` field. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: https://github.com/nodejs/node/pull/33255 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com>

view details

push time in 24 days

pull request commentnodejs/node

n-api: add uint32 test for -1

Landed in e454e9b33f2a3e21d0c36a96d47cf39ce3e42d6c.

gabrielschulhof

comment created time in 24 days

PR closed nodejs/node

n-api: add uint32 test for -1 n-api test

Adds a test to ensure that napi_get_value_uint32 returns 0xffffffff for -1.

Re: https://github.com/nodejs/node/issues/33117 Signed-off-by: @gabrielschulhof

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] tests and/or benchmarks are included
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+1 -0

4 comments

1 changed file

gabrielschulhof

pr closed time in 24 days

push eventnodejs/node

Gabriel Schulhof

commit sha e454e9b33f2a3e21d0c36a96d47cf39ce3e42d6c

n-api: add uint32 test for -1 Adds a test to ensure that napi_get_value_uint32 returns 0xffffffff for -1. Re: https://github.com/nodejs/node/issues/33117 Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>

view details

push time in 24 days

pull request commentnodejs/node

n-api: add uint32 test for -1

Touched the commit so as to trigger the actions.

gabrielschulhof

comment created time in 25 days

push eventgabrielschulhof/node

Gabriel Schulhof

commit sha 9a17045f92e60e3e4d4947fc6a5a33968d5249f1

src: clean up large pages code * Initialize structure members. * Factor out common `Debug()` prefix. * Remove unused `text_region` field. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>

view details

Gabriel Schulhof

commit sha 2446015d24e1d477247b178ed16e6f3554e07681

src: align text section to 2MiB and use main * Set the alignment of the `.text` section to 2MiB by aligning the `__node_text_start` symbol to 2MiB. * Use the address of `main()` as a secondary reference symbol in case it is located on a page lower than `__node_text_start`, in which case we will have discovered an additional page we can include in the re-mapping. * Remove the assumption that the `lpstub` section follows the `.text` section immediately by relying on the linker-provided `__etext` symbol to identify the end of the `.text` section. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>

view details

push time in 25 days

push eventgabrielschulhof/node

Gabriel Schulhof

commit sha 9a17045f92e60e3e4d4947fc6a5a33968d5249f1

src: clean up large pages code * Initialize structure members. * Factor out common `Debug()` prefix. * Remove unused `text_region` field. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>

view details

Gabriel Schulhof

commit sha 2446015d24e1d477247b178ed16e6f3554e07681

src: align text section to 2MiB and use main * Set the alignment of the `.text` section to 2MiB by aligning the `__node_text_start` symbol to 2MiB. * Use the address of `main()` as a secondary reference symbol in case it is located on a page lower than `__node_text_start`, in which case we will have discovered an additional page we can include in the re-mapping. * Remove the assumption that the `lpstub` section follows the `.text` section immediately by relying on the linker-provided `__etext` symbol to identify the end of the `.text` section. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>

view details

Gabriel Schulhof

commit sha 721061f9b169ea1bd4c2cbe0e59c16f1904bae7b

src: add large pages option for direct madise(2) This adds the option --largepages-method with possible values `copy` (the default) and `direct`, which lets the user skip the step whereby a new mapping is created. Instead, the existing mapping is `madvise(2)`-ed to huge pages. The advantage is that the resulting mapping can be shared across processes. The `direct` option is ignored on platforms other than Linux, meaning `copy` is always used. On Linux the `direct` option will always work but it is only beneficial when running on kernel version >= 5.4 with config option READ_ONLY_THP_FOR_FS turned on.

view details

push time in 25 days

push eventgabrielschulhof/node

Gabriel Schulhof

commit sha 7923d9d8bc1e8f22fbc820b69558b7dc5843a563

n-api: add uint32 test for -1 Adds a test to ensure that napi_get_value_uint32 returns 0xffffffff for -1. Re: https://github.com/nodejs/node/issues/33117 Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>

view details

push time in 25 days

pull request commentnodejs/node

n-api: add uint32 test for -1

Interestingly, no github actions were performed on this commit 🤨

gabrielschulhof

comment created time in 25 days

Pull request review commentnodejs/node

src: clean up large pages code

 namespace node { namespace {  struct text_region {-  char* from;-  char* to;-  int   total_hugepages;-  bool  found_text_region;+  char* from = nullptr;+  char* to = nullptr;+  bool found_text_region = false; };  static const size_t hps = 2L * 1024 * 1024;  template <typename... Args>-inline void Debug(Args&&... args) {+inline void Debug(std::string fmt, Args&&... args) {   node::Debug(&per_process::enabled_debug_list,               DebugCategory::HUGEPAGES,+              (std::string("Hugepages info: ") + fmt).c_str(),               std::forward<Args>(args)...);

Well, if several categories are given, debug statements from them might become interleaved. We could certainly push prefixing with the category into node::Debug, but that's beyond the scope of this PR, IMO.

gabrielschulhof

comment created time in a month

issue commentnodejs/abi-stable-node

Transfer the N-API tutorials into the OpenJS Foundation

@jschlight I found a nit:

https://xenodochial-meitner-2e429e.netlify.app/content/build-tools/cmake-js -# define NPI_VERSION +# define NAPI_VERSION

jschlight

comment created time in a month

PR opened nodejs/node

Reviewers
src: clean up large pages code C++
  • Initialize structure members.
  • Factor out common Debug() prefix.
  • Remove unused text_region field.

Signed-off-by: @gabrielschulhof

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+14 -19

0 comment

1 changed file

pr created time in a month

push eventgabrielschulhof/node

Robert Nagy

commit sha e5512acfa737b86dac0906414d2b34ab1ca6c6d0

doc: document major finished changes in v14 Added description of semver-major changes to finished in v14. PR-URL: https://github.com/nodejs/node/pull/33065 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Stephen Belanger

commit sha a8236e0f710c9b28febca6e4294f751b11ad72a9

src: add AsyncWrapObject constructor template factory PR-URL: https://github.com/nodejs/node/pull/33051 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>

view details

Michaël Zasso

commit sha 16d794dae64529f908659fca97370760bfd89fc2

doc: improve release documentation Extract the "Cherry-pick the Release Commit to master" part to its own section and be more precise about what should be done to handle conflicts. PR-URL: https://github.com/nodejs/node/pull/33042 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>

view details

Myles Borins

commit sha 2439071e18dd625d0f91bd2be3eb8b7fc6894eaf

module: refactor condition PR-URL: https://github.com/nodejs/node/pull/32989 Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>

view details

Sam Roberts

commit sha 684a81d023dc4071c31b994f0447d3401af228f8

doc: make openssl maintenance position independent It used to have some `cd` commands that if done literally would invalidate the subsequent commands. Modify them to be more accurate, which also simplifies pasting them directly into the console from the guide while doing an update. PR-URL: https://github.com/nodejs/node/pull/32977 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>

view details

Thomas

commit sha 4e8797353c86ba86799ce0d19236d133188f1c9d

build: fix vcbuild error for missing Visual Studio The previous error was wrongly redirecting users to the ICU installation steps, which is unrelated to missing Visual Studio. PR-URL: https://github.com/nodejs/node/pull/32658 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

view details

Liran Tal

commit sha 6b2e3afee95f5d5fdc0751b6f58c447b87d8ec47

doc: improve WHATWG url constructor code example Currently, the URL docs for the WHATWG URL spec support are somewhat lacking in their code example of how to access the new URL constructor that lives inside the core url package. PR-URL: https://github.com/nodejs/node/pull/32782 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Richard Lau

commit sha 76ba9503a2aa1e2f4a304c4d2c60756cfa7ee09e

doc: assign missing deprecation code Signed-off-by: Richard Lau <riclau@uk.ibm.com> PR-URL: https://github.com/nodejs/node/pull/33109 Refs: https://github.com/nodejs/node/pull/32807 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>

view details

legendecas

commit sha 307c67be175b8fe7d9dd9e1b5ed55d928b73d66d

n-api: fix false assumption on napi_async_context structures napi_async_context should be an opaque type and not be used as same as node::async_context. PR-URL: https://github.com/nodejs/node/pull/32928 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

himself65

commit sha 039c5e4b893071ab8857794ea421481b87fb31eb

tools: update ESLint to 7.0.0-rc.0 PR-URL: https://github.com/nodejs/node/pull/33062 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>

view details

Anna Henningsen

commit sha 9c7c8769183b5d58925925b8d34571f41e7be275

doc: fix LTS replaceme tags When cherry-picking release commits for LTS releases into master, the `REPLACEME` metadata can be taken over as well, to give users a more accurate view of what is being released on which release line. This addresses this problem for all previous LTS releases for which this has not been done. Fixes: https://github.com/nodejs/node/issues/33001 PR-URL: https://github.com/nodejs/node/pull/33041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com>

view details

Michaël Zasso

commit sha 165011ea983dc734821f58832d4e4713ee81f326

2020-04-28, Version 12.16.3 'Erbium' (LTS) Notable changes: Dependencies: * Updated OpenSSL to 1.1.1g. https://github.com/nodejs/node/pull/32971 * Updated c-ares to 1.16.0. https://github.com/nodejs/node/pull/32246 * Updated experimental uvwasi to 0.0.6. https://github.com/nodejs/node/pull/32309 ESM (experimental): * Additional warnings are no longer printed for modules that use conditional exports or package name self resolution. https://github.com/nodejs/node/pull/31845 PR-URL: https://github.com/nodejs/node/pull/33009

view details

Michaël Zasso

commit sha 563efb757eeedb6980224f049254b6c785e05e91

deps: patch V8 to 8.1.307.31 Refs: https://github.com/v8/v8/compare/8.1.307.30...8.1.307.31 PR-URL: https://github.com/nodejs/node/pull/33080 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>

view details

Robert Nagy

commit sha 4bc7025309bc5b5263833635dbcebabac9bb8d30

stream: write should throw on unknown encoding Validate encoding passed to write(chunk, encoding, cb) and throw if it is invalid. PR-URL: https://github.com/nodejs/node/pull/33075 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

view details

Robert Nagy

commit sha f64c640e66ef9393139062991aa87b51f06f6294

stream: don't emit end after close Readable stream could emit 'end' after 'close'. PR-URL: https://github.com/nodejs/node/pull/33076 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

himself65

commit sha 9545013b525f89f77a897b9137f10d3e1c04f971

vm: throw error when duplicated exportNames in SyntheticModule Fixes: https://github.com/nodejs/node/issues/32806 PR-URL: https://github.com/nodejs/node/pull/32810 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com>

view details

cjihrig

commit sha 9037ad3e78324be6952ea114bf1fd701a2803516

tools: update broken types in type parser The links for the ArrayBufferView and WebAssembly.Instance types appear to be broken. This commit updates them to point to the correct MDN locations. PR-URL: https://github.com/nodejs/node/pull/33068 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

cjihrig

commit sha 4791ea09bd15fac9d7a057611d62c145f4f7a536

wasi: rename __wasi_unstable_reactor_start() Upstream WASI has renamed __wasi_unstable_reactor_start() to _initialize(). This commit updates Node's WASI implementation to reflect that change. PR-URL: https://github.com/nodejs/node/pull/33073 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host>

view details

cjihrig

commit sha 6ca6db105d8db40af538e275f39612b569b9c141

wasi: update start() behavior to match spec _start() and _initialize() shouldn't be called from the same function, as they have different behavior. Furthermore, Node should throw if both are provided. This commit updates the implementation, docs, and tests accordingly. PR-URL: https://github.com/nodejs/node/pull/33073 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host>

view details

cjihrig

commit sha 497ad815aee22a70121ca6d51d69bc0bcc923fa3

deps: update to uvwasi 0.0.8 This release focuses on improving the robustness of the path resolution and sandboxing, including adding support for relative preopen paths. PR-URL: https://github.com/nodejs/node/pull/33078 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

push time in a month

push eventgabrielschulhof/node

Robert Nagy

commit sha e5512acfa737b86dac0906414d2b34ab1ca6c6d0

doc: document major finished changes in v14 Added description of semver-major changes to finished in v14. PR-URL: https://github.com/nodejs/node/pull/33065 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Stephen Belanger

commit sha a8236e0f710c9b28febca6e4294f751b11ad72a9

src: add AsyncWrapObject constructor template factory PR-URL: https://github.com/nodejs/node/pull/33051 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>

view details

Michaël Zasso

commit sha 16d794dae64529f908659fca97370760bfd89fc2

doc: improve release documentation Extract the "Cherry-pick the Release Commit to master" part to its own section and be more precise about what should be done to handle conflicts. PR-URL: https://github.com/nodejs/node/pull/33042 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>

view details

Myles Borins

commit sha 2439071e18dd625d0f91bd2be3eb8b7fc6894eaf

module: refactor condition PR-URL: https://github.com/nodejs/node/pull/32989 Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>

view details

Sam Roberts

commit sha 684a81d023dc4071c31b994f0447d3401af228f8

doc: make openssl maintenance position independent It used to have some `cd` commands that if done literally would invalidate the subsequent commands. Modify them to be more accurate, which also simplifies pasting them directly into the console from the guide while doing an update. PR-URL: https://github.com/nodejs/node/pull/32977 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>

view details

Thomas

commit sha 4e8797353c86ba86799ce0d19236d133188f1c9d

build: fix vcbuild error for missing Visual Studio The previous error was wrongly redirecting users to the ICU installation steps, which is unrelated to missing Visual Studio. PR-URL: https://github.com/nodejs/node/pull/32658 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

view details

Liran Tal

commit sha 6b2e3afee95f5d5fdc0751b6f58c447b87d8ec47

doc: improve WHATWG url constructor code example Currently, the URL docs for the WHATWG URL spec support are somewhat lacking in their code example of how to access the new URL constructor that lives inside the core url package. PR-URL: https://github.com/nodejs/node/pull/32782 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Richard Lau

commit sha 76ba9503a2aa1e2f4a304c4d2c60756cfa7ee09e

doc: assign missing deprecation code Signed-off-by: Richard Lau <riclau@uk.ibm.com> PR-URL: https://github.com/nodejs/node/pull/33109 Refs: https://github.com/nodejs/node/pull/32807 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>

view details

legendecas

commit sha 307c67be175b8fe7d9dd9e1b5ed55d928b73d66d

n-api: fix false assumption on napi_async_context structures napi_async_context should be an opaque type and not be used as same as node::async_context. PR-URL: https://github.com/nodejs/node/pull/32928 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

himself65

commit sha 039c5e4b893071ab8857794ea421481b87fb31eb

tools: update ESLint to 7.0.0-rc.0 PR-URL: https://github.com/nodejs/node/pull/33062 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>

view details

Anna Henningsen

commit sha 9c7c8769183b5d58925925b8d34571f41e7be275

doc: fix LTS replaceme tags When cherry-picking release commits for LTS releases into master, the `REPLACEME` metadata can be taken over as well, to give users a more accurate view of what is being released on which release line. This addresses this problem for all previous LTS releases for which this has not been done. Fixes: https://github.com/nodejs/node/issues/33001 PR-URL: https://github.com/nodejs/node/pull/33041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com>

view details

Michaël Zasso

commit sha 165011ea983dc734821f58832d4e4713ee81f326

2020-04-28, Version 12.16.3 'Erbium' (LTS) Notable changes: Dependencies: * Updated OpenSSL to 1.1.1g. https://github.com/nodejs/node/pull/32971 * Updated c-ares to 1.16.0. https://github.com/nodejs/node/pull/32246 * Updated experimental uvwasi to 0.0.6. https://github.com/nodejs/node/pull/32309 ESM (experimental): * Additional warnings are no longer printed for modules that use conditional exports or package name self resolution. https://github.com/nodejs/node/pull/31845 PR-URL: https://github.com/nodejs/node/pull/33009

view details

Michaël Zasso

commit sha 563efb757eeedb6980224f049254b6c785e05e91

deps: patch V8 to 8.1.307.31 Refs: https://github.com/v8/v8/compare/8.1.307.30...8.1.307.31 PR-URL: https://github.com/nodejs/node/pull/33080 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>

view details

Robert Nagy

commit sha 4bc7025309bc5b5263833635dbcebabac9bb8d30

stream: write should throw on unknown encoding Validate encoding passed to write(chunk, encoding, cb) and throw if it is invalid. PR-URL: https://github.com/nodejs/node/pull/33075 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

view details

Robert Nagy

commit sha f64c640e66ef9393139062991aa87b51f06f6294

stream: don't emit end after close Readable stream could emit 'end' after 'close'. PR-URL: https://github.com/nodejs/node/pull/33076 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

himself65

commit sha 9545013b525f89f77a897b9137f10d3e1c04f971

vm: throw error when duplicated exportNames in SyntheticModule Fixes: https://github.com/nodejs/node/issues/32806 PR-URL: https://github.com/nodejs/node/pull/32810 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com>

view details

cjihrig

commit sha 9037ad3e78324be6952ea114bf1fd701a2803516

tools: update broken types in type parser The links for the ArrayBufferView and WebAssembly.Instance types appear to be broken. This commit updates them to point to the correct MDN locations. PR-URL: https://github.com/nodejs/node/pull/33068 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

cjihrig

commit sha 4791ea09bd15fac9d7a057611d62c145f4f7a536

wasi: rename __wasi_unstable_reactor_start() Upstream WASI has renamed __wasi_unstable_reactor_start() to _initialize(). This commit updates Node's WASI implementation to reflect that change. PR-URL: https://github.com/nodejs/node/pull/33073 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host>

view details

cjihrig

commit sha 6ca6db105d8db40af538e275f39612b569b9c141

wasi: update start() behavior to match spec _start() and _initialize() shouldn't be called from the same function, as they have different behavior. Furthermore, Node should throw if both are provided. This commit updates the implementation, docs, and tests accordingly. PR-URL: https://github.com/nodejs/node/pull/33073 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host>

view details

cjihrig

commit sha 497ad815aee22a70121ca6d51d69bc0bcc923fa3

deps: update to uvwasi 0.0.8 This release focuses on improving the robustness of the path resolution and sandboxing, including adding support for relative preopen paths. PR-URL: https://github.com/nodejs/node/pull/33078 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

push time in a month

create barnchgabrielschulhof/node

branch : large-pages-code-cleanup

created branch time in a month

pull request commentintel/iodlr

read ELF .text section header for address and size and create LD_PRELOAD target

@suresh-srinivas that's a good point. I was thinking about moving the code that reads the ELF into lp_preload.c.

gabrielschulhof

comment created time in a month

issue commentnodejs/node

napi_get_value_uint32 difference between Node 14 and previous

@emilbayes I checked all the way back to v10.x and napi_get_value_uint32() of -1 always returns 0xffffffff.

emilbayes

comment created time in a month

PR opened nodejs/node

n-api: add uint32 test for -1 n-api

Adds a test to ensure that napi_get_value_uint32 returns 0xffffffff for -1.

Re: https://github.com/nodejs/node/issues/33117 Signed-off-by: @gabrielschulhof

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] tests and/or benchmarks are included
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+1 -0

0 comment

1 changed file

pr created time in a month

push eventgabrielschulhof/node

Gabriel Schulhof

commit sha 870e1d896ab82dcffdbdb4ba99829669b819f9de

src: align text section to 2MiB and use main * Set the alignment of the `.text` section to 2MiB by aligning the `__node_text_start` symbol to 2MiB. * Use the address of `main()` as a secondary reference symbol in case it is located on a page lower than `__node_text_start`, in which case we will have discovered an additional page we can include in the re-mapping. * Remove the assumption that the `lpstub` section follows the `.text` section immediately by relying on the linker-provided `__etext` symbol to identify the end of the `.text` section. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>

view details

Gabriel Schulhof

commit sha c151f35fe3ca579e734dd8ed3e4b4559d1624ffb

consider _start also if available

view details

Gabriel Schulhof

commit sha fb24364d1e7bbae8174ff7f21b95ea4f5bb436d4

systematically trim beginning and end

view details

Gabriel Schulhof

commit sha 014720c20122d6a0716ade27286429b2ba70278e

tmp:tmp

view details

Gabriel Schulhof

commit sha 2a7ca6e9f3aebac805ad9140b37d0562183d517b

__etext is unavailable on FreeBSD 12.1

view details

Gabriel Schulhof

commit sha 8d03571931f833b19174ecfda41ce56935d23d5e

tmp:tmp

view details

Gabriel Schulhof

commit sha 0da54b2af072a5a23ef414d9591c323ce124ba7f

src: add large pages option for direct madise(2) This adds the option --largepages-method with possible values `copy` (the default) and `direct`, which lets the user skip the step whereby a new mapping is created. Instead, the existing mapping is `madvise(2)`-ed to huge pages. The advantage is that the resulting mapping can be shared across processes. The `direct` option is ignored on platforms other than Linux, meaning `copy` is always used. On Linux the `direct` option will always work but it is only beneficial when running on kernel version >= 5.4 with config option READ_ONLY_THP_FOR_FS turned on.

view details

push time in a month

delete branch gabrielschulhof/node

delete branch : tmp

delete time in a month

created taggabrielschulhof/node

tagv14.1.0

Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:

created time in a month

push eventgabrielschulhof/node

Robert Nagy

commit sha e5512acfa737b86dac0906414d2b34ab1ca6c6d0

doc: document major finished changes in v14 Added description of semver-major changes to finished in v14. PR-URL: https://github.com/nodejs/node/pull/33065 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Stephen Belanger

commit sha a8236e0f710c9b28febca6e4294f751b11ad72a9

src: add AsyncWrapObject constructor template factory PR-URL: https://github.com/nodejs/node/pull/33051 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>

view details

Michaël Zasso

commit sha 16d794dae64529f908659fca97370760bfd89fc2

doc: improve release documentation Extract the "Cherry-pick the Release Commit to master" part to its own section and be more precise about what should be done to handle conflicts. PR-URL: https://github.com/nodejs/node/pull/33042 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>

view details

Myles Borins

commit sha 2439071e18dd625d0f91bd2be3eb8b7fc6894eaf

module: refactor condition PR-URL: https://github.com/nodejs/node/pull/32989 Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>

view details

Sam Roberts

commit sha 684a81d023dc4071c31b994f0447d3401af228f8

doc: make openssl maintenance position independent It used to have some `cd` commands that if done literally would invalidate the subsequent commands. Modify them to be more accurate, which also simplifies pasting them directly into the console from the guide while doing an update. PR-URL: https://github.com/nodejs/node/pull/32977 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>

view details

Thomas

commit sha 4e8797353c86ba86799ce0d19236d133188f1c9d

build: fix vcbuild error for missing Visual Studio The previous error was wrongly redirecting users to the ICU installation steps, which is unrelated to missing Visual Studio. PR-URL: https://github.com/nodejs/node/pull/32658 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

view details

Liran Tal

commit sha 6b2e3afee95f5d5fdc0751b6f58c447b87d8ec47

doc: improve WHATWG url constructor code example Currently, the URL docs for the WHATWG URL spec support are somewhat lacking in their code example of how to access the new URL constructor that lives inside the core url package. PR-URL: https://github.com/nodejs/node/pull/32782 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Richard Lau

commit sha 76ba9503a2aa1e2f4a304c4d2c60756cfa7ee09e

doc: assign missing deprecation code Signed-off-by: Richard Lau <riclau@uk.ibm.com> PR-URL: https://github.com/nodejs/node/pull/33109 Refs: https://github.com/nodejs/node/pull/32807 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>

view details

legendecas

commit sha 307c67be175b8fe7d9dd9e1b5ed55d928b73d66d

n-api: fix false assumption on napi_async_context structures napi_async_context should be an opaque type and not be used as same as node::async_context. PR-URL: https://github.com/nodejs/node/pull/32928 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

himself65

commit sha 039c5e4b893071ab8857794ea421481b87fb31eb

tools: update ESLint to 7.0.0-rc.0 PR-URL: https://github.com/nodejs/node/pull/33062 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>

view details

Anna Henningsen

commit sha 9c7c8769183b5d58925925b8d34571f41e7be275

doc: fix LTS replaceme tags When cherry-picking release commits for LTS releases into master, the `REPLACEME` metadata can be taken over as well, to give users a more accurate view of what is being released on which release line. This addresses this problem for all previous LTS releases for which this has not been done. Fixes: https://github.com/nodejs/node/issues/33001 PR-URL: https://github.com/nodejs/node/pull/33041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com>

view details

Michaël Zasso

commit sha 165011ea983dc734821f58832d4e4713ee81f326

2020-04-28, Version 12.16.3 'Erbium' (LTS) Notable changes: Dependencies: * Updated OpenSSL to 1.1.1g. https://github.com/nodejs/node/pull/32971 * Updated c-ares to 1.16.0. https://github.com/nodejs/node/pull/32246 * Updated experimental uvwasi to 0.0.6. https://github.com/nodejs/node/pull/32309 ESM (experimental): * Additional warnings are no longer printed for modules that use conditional exports or package name self resolution. https://github.com/nodejs/node/pull/31845 PR-URL: https://github.com/nodejs/node/pull/33009

view details

Michaël Zasso

commit sha 563efb757eeedb6980224f049254b6c785e05e91

deps: patch V8 to 8.1.307.31 Refs: https://github.com/v8/v8/compare/8.1.307.30...8.1.307.31 PR-URL: https://github.com/nodejs/node/pull/33080 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>

view details

Robert Nagy

commit sha 4bc7025309bc5b5263833635dbcebabac9bb8d30

stream: write should throw on unknown encoding Validate encoding passed to write(chunk, encoding, cb) and throw if it is invalid. PR-URL: https://github.com/nodejs/node/pull/33075 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

view details

Robert Nagy

commit sha f64c640e66ef9393139062991aa87b51f06f6294

stream: don't emit end after close Readable stream could emit 'end' after 'close'. PR-URL: https://github.com/nodejs/node/pull/33076 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

himself65

commit sha 9545013b525f89f77a897b9137f10d3e1c04f971

vm: throw error when duplicated exportNames in SyntheticModule Fixes: https://github.com/nodejs/node/issues/32806 PR-URL: https://github.com/nodejs/node/pull/32810 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com>

view details

cjihrig

commit sha 9037ad3e78324be6952ea114bf1fd701a2803516

tools: update broken types in type parser The links for the ArrayBufferView and WebAssembly.Instance types appear to be broken. This commit updates them to point to the correct MDN locations. PR-URL: https://github.com/nodejs/node/pull/33068 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

cjihrig

commit sha 4791ea09bd15fac9d7a057611d62c145f4f7a536

wasi: rename __wasi_unstable_reactor_start() Upstream WASI has renamed __wasi_unstable_reactor_start() to _initialize(). This commit updates Node's WASI implementation to reflect that change. PR-URL: https://github.com/nodejs/node/pull/33073 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host>

view details

cjihrig

commit sha 6ca6db105d8db40af538e275f39612b569b9c141

wasi: update start() behavior to match spec _start() and _initialize() shouldn't be called from the same function, as they have different behavior. Furthermore, Node should throw if both are provided. This commit updates the implementation, docs, and tests accordingly. PR-URL: https://github.com/nodejs/node/pull/33073 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host>

view details

cjihrig

commit sha 497ad815aee22a70121ca6d51d69bc0bcc923fa3

deps: update to uvwasi 0.0.8 This release focuses on improving the robustness of the path resolution and sandboxing, including adding support for relative preopen paths. PR-URL: https://github.com/nodejs/node/pull/33078 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

push time in a month

create barnchgabrielschulhof/node

branch : large-pages-align-2M-with-remap

created branch time in a month

created taggabrielschulhof/node

tagv13.14.0

Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:

created time in a month

create barnchgabrielschulhof/node

branch : napi-get-value-uint32-with--1

created branch time in a month

push eventgabrielschulhof/node

Kamil Rytarowski

commit sha 1b5adbcaa8015071c18dbdff64536e907abadaf7

build: allow clang 10+ in configure.py Detected on NetBSD/amd64. Fixes: https://github.com/nodejs/node/issues/29536 PR-URL: https://github.com/nodejs/node/pull/29541 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>

view details

Richard Lau

commit sha a85721a1113a8b1df791ae007304d2a85de4b031

build: move doc versions JSON file out of out/doc Move the generated previous doc versions JSON file out of `out/doc` to prevent it being included in the distributed packages. Signed-off-by: Richard Lau <riclau@uk.ibm.com> PR-URL: https://github.com/nodejs/node/pull/32728 Fixes: https://github.com/nodejs/build/issues/2276 Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

view details

push time in a month

more