-
Notifications
You must be signed in to change notification settings - Fork 29.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8.x] n-api: backport changes from master #19265
[8.x] n-api: backport changes from master #19265
Commits on Apr 12, 2018
-
test: add unhandled rejection guard
Add an unhandled rejection function in addons-napi/test_promise/test.js. Also, add a rejection handler to catch the unhandled rejection after introducing the guard and test the reason code. PR-URL: nodejs#17275 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Configuration menu - View commit details
-
Copy full SHA for e304c42 - Browse repository at this point
Copy the full SHA e304c42View commit details -
test: remove literals that obscure assert messages
Remove string literals as messages to `assert.strictEqual()`. They can be misleading here (where perhaps the reason an assertino failed isn't that the deleter wasn't called but rather was called too many times. PR-URL: nodejs#17642 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Configuration menu - View commit details
-
Copy full SHA for 887dcb9 - Browse repository at this point
Copy the full SHA 887dcb9View commit details -
n-api: fix memory leak in napi_async_destroy()
PR-URL: nodejs#17714 Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
alnyan authored and Gabriel Schulhof committedApr 12, 2018 Configuration menu - View commit details
-
Copy full SHA for bba1442 - Browse repository at this point
Copy the full SHA bba1442View commit details -
test: remove ambiguous error messages from test_error
assert.strictEqual accepts 3 arguments, the last of which allows for user-specified error message to be thrown when the assertion fails. Unfortunately, this error message is less helpful than the default when it is vague. This commit removes vague, user-specified error messages, instead relying on clearer, default error messages. PR-URL: nodejs#17812 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for bcbb7af - Browse repository at this point
Copy the full SHA bcbb7afView commit details -
doc: updates examples to use NULL
Examples in the N-API doc used a mix of nullptr and NULL. We should be consistent and because N-API is a 'C' API I believe using NULL is better. This will avoid any potential confusion as to whether N-API can be used with plain C. PR-URL: nodejs#18008 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Configuration menu - View commit details
-
Copy full SHA for 6bf3769 - Browse repository at this point
Copy the full SHA 6bf3769View commit details -
n-api: throw RangeError in napi_create_dataview() with invalid range
The API is required that `byte_length + byte_offset` is less than or equal to the size in bytes of the array passed in. If not, a RangeError exception is raised[1]. [1] https://nodejs.org/api/n-api.html#n_api_napi_create_dataview PR-URL: nodejs#17869 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f81330f - Browse repository at this point
Copy the full SHA f81330fView commit details -
n-api: expose n-api version in process.versions
Expose n-api version in process.versions so that it is available for use in javascript by external modules like node-pre-gyp. It was previously accessible through a functon available in the N-API. PR-URL: nodejs#18067 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Tobias Nießn <tniessen@tnie.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Configuration menu - View commit details
-
Copy full SHA for 6d23c24 - Browse repository at this point
Copy the full SHA 6d23c24View commit details -
doc: napi: fix unbalanced emphasis
Some of the section headers had unbalanced emphasis. PR-URL: nodejs#18122 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Configuration menu - View commit details
-
Copy full SHA for 40ce083 - Browse repository at this point
Copy the full SHA 40ce083View commit details -
doc: napi: make header style consistent
Some of the API section headers had emphasis, while others did not. Use a consistent style (no emphasis) for all of them, as that matches our other API docs. PR-URL: nodejs#18122 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Configuration menu - View commit details
-
Copy full SHA for 621117e - Browse repository at this point
Copy the full SHA 621117eView commit details -
n-api: throw RangeError napi_create_typedarray()
According to the ECMA spec, we should throw a RangeError in the following cases: - `(length * elementSize) + offset` > the size of the array passed in - `offset % elementSize` != `0` In the current implementation, this check was omitted. So, the following code will cause a crash. ``` napi_create_typedarray(env, napi_uint16_array, 2 /* length */, buffer, 1 /* byte_offset */, &output_array); ``` This change fixes the problem and write some related tests. Refs: https://tc39.github.io/ecma262/#sec-typedarray-buffer-byteoffset-length PR-URL: nodejs#18037 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Configuration menu - View commit details
-
Copy full SHA for 111678b - Browse repository at this point
Copy the full SHA 111678bView commit details -
test: fixed typos in napi test
PR-URL: nodejs#18148 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 94618a5 - Browse repository at this point
Copy the full SHA 94618a5View commit details -
doc: remove uannecessary Require
This was the only instance were we said a parameter was required. It is assumed parameters are required unless the doc says they are option. Remove `Required` to make consistent with the rest of the doc PR-URL: nodejs#18184 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 375d043 - Browse repository at this point
Copy the full SHA 375d043View commit details -
timers: allow Immediates to be unrefed
Refactor Immediates handling to allow for them to be unrefed, similar to setTimeout, but without extra handles. Document the new `immediate.ref()` and `immediate.unref()` methods. Add SetImmediateUnref on the C++ side. PR-URL: nodejs#18139 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f7fb0c3 - Browse repository at this point
Copy the full SHA f7fb0c3View commit details -
test: refactor addons-napi/test_exception/test.js
* provide block scoping to prevent unintended side effects * remove confusing and unnecessary assertion message * use consisitent `actual, expected` argument order for assertions PR-URL: nodejs#18340 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 23fd460 - Browse repository at this point
Copy the full SHA 23fd460View commit details -
n-api: change assert ok check to notStrictEqual.
PR-URL: nodejs#18414 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: Ruben Bridgewater <ruben@bridgewater.de>
Configuration menu - View commit details
-
Copy full SHA for 021e4a4 - Browse repository at this point
Copy the full SHA 021e4a4View commit details -
test: show pending exception error in napi tests
Shows the result of the wasPending in the error message if the assertion fails. PR-URL: nodejs#18413 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Configuration menu - View commit details
-
Copy full SHA for bf96235 - Browse repository at this point
Copy the full SHA bf96235View commit details -
n-api: implement wrapping using private properties
PR-URL: nodejs#18311 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Fixes: nodejs#14367
Gabriel Schulhof committedApr 12, 2018 Configuration menu - View commit details
-
Copy full SHA for 17862cd - Browse repository at this point
Copy the full SHA 17862cdView commit details -
n-api: wrap control flow macro in do/while
Make CHECK_ENV() safe to use in the following context: if (condition) CHECK_ENV(env); else something_else(); PR-URL: nodejs#18532 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 29bbf0c - Browse repository at this point
Copy the full SHA 29bbf0cView commit details -
doc: remove usage of you in n-api doc
We avoid using 'you' in the documentation based on our guidelines. Remove usage in the n-api doc. PR-URL: nodejs#18528 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6619a1b - Browse repository at this point
Copy the full SHA 6619a1bView commit details -
PR-URL: nodejs#18555 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
Configuration menu - View commit details
-
Copy full SHA for 8923ad5 - Browse repository at this point
Copy the full SHA 8923ad5View commit details -
n-api: add methods to open/close callback scope
Add support for the following methods; napi_open_callback_scope napi_close_callback_scope These are needed when running asynchronous methods directly using uv. PR-URL: nodejs#18089 Fixes: nodejs#15604 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Configuration menu - View commit details
-
Copy full SHA for ed8ac32 - Browse repository at this point
Copy the full SHA ed8ac32View commit details -
n-api: remove extra reference from test
PR-URL: nodejs#18542 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Gabriel Schulhof committedApr 12, 2018 Configuration menu - View commit details
-
Copy full SHA for 01b28fa - Browse repository at this point
Copy the full SHA 01b28faView commit details -
PR-URL: nodejs#18590 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Configuration menu - View commit details
-
Copy full SHA for d2f0672 - Browse repository at this point
Copy the full SHA d2f0672View commit details -
test: improve error message output
PR-URL: nodejs#18498 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Configuration menu - View commit details
-
Copy full SHA for 9c20b87 - Browse repository at this point
Copy the full SHA 9c20b87View commit details -
test: convert new tests to use error types
PR-URL: nodejs#18581 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ef50323 - Browse repository at this point
Copy the full SHA ef50323View commit details -
doc: fix exporting a function example
Missing the length argument in napi_create_function. PR-URL: nodejs#18661 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Aonghus O Nia authored and Gabriel Schulhof committedApr 12, 2018 Configuration menu - View commit details
-
Copy full SHA for c4592e6 - Browse repository at this point
Copy the full SHA c4592e6View commit details -
doc: mark NAPI_AUTO_LENGTH as code
PR-URL: nodejs#18697 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5ab4d31 - Browse repository at this point
Copy the full SHA 5ab4d31View commit details -
test: remove unnecessary timer
The timer in NAPI's test_callback_scope/test-resolve-async.js can be removed. If the test fails, it will timeout on its own. The extra timer increases the chances of the test being flaky. PR-URL: nodejs#18719 Fixes: nodejs#18702 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a1df466 - Browse repository at this point
Copy the full SHA a1df466View commit details -
Passing a pointer to a static integer is sufficient for the test. PR-URL: nodejs#19039 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Hitesh Kanwathirtha <hiteshk@microsoft.com>
Gabriel Schulhof committedApr 12, 2018 Configuration menu - View commit details
-
Copy full SHA for eb85cd8 - Browse repository at this point
Copy the full SHA eb85cd8View commit details -
doc: fix n-api asynchronous threading docs
Documentation for N-API Custom Asynchronous Operations incorrectly stated that async execution happens on the main event loop. Added details to napi_create_async_work about which threads are used to invoke the execute and complete callbacks. Changed 'async' to 'asynchronous' in the documentation for Custom Asynchronous Operations. Changed "executes in parallel" to "can execute in parallel" for the documentation of napi_create_async_work execute parameter. PR-URL: nodejs#19073 Fixes: nodejs#19071 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Configuration menu - View commit details
-
Copy full SHA for 2b3207d - Browse repository at this point
Copy the full SHA 2b3207dView commit details -
Remove the necessity for allocating on the heap, and assert that the correct pointer gets passed to the finalizer. PR-URL: nodejs#19086 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Gabriel Schulhof committedApr 12, 2018 Configuration menu - View commit details
-
Copy full SHA for 7a80a8d - Browse repository at this point
Copy the full SHA 7a80a8dView commit details -
Document which APIs work while an exception is pending. This is the list of all APIs which do not start with `NAPI_PREAMBLE(env)`. Fixes: nodejs/abi-stable-node#257 PR-URL: nodejs#19078 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Gabriel Schulhof committedApr 12, 2018 Configuration menu - View commit details
-
Copy full SHA for de2d3a6 - Browse repository at this point
Copy the full SHA de2d3a6View commit details -
n-api: resolve promise in test
The last promise created by the test for the purposes of making sure that its type is indeed a promise needs to be resolved so as to avoid having it left in the pending state at the end of the test. PR-URL: nodejs#19245 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Gabriel Schulhof committedApr 12, 2018 Configuration menu - View commit details
-
Copy full SHA for a92796e - Browse repository at this point
Copy the full SHA a92796eView commit details -
n-api,test: add a new.target test to addons-napi
Added a N-API test to verify new.target behavior. PR-URL: nodejs#19236 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Configuration menu - View commit details
-
Copy full SHA for 2cfd4fe - Browse repository at this point
Copy the full SHA 2cfd4feView commit details -
n-api,test: add int64 bounds tests
Added some simple tests to verify that the int64 API is correctly handling numbers greater than 32-bits. This is a basic test, but verifies that an implementer hasn't truncated back to 32-bits. Refs: nodejs/node-chakracore#496 PR-URL: nodejs#19309 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4a0fc8a - Browse repository at this point
Copy the full SHA 4a0fc8aView commit details -
PR-URL: nodejs#19385 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ff968b7 - Browse repository at this point
Copy the full SHA ff968b7View commit details -
n-api: add missing exception checking
Add checks for a pending exception in napi_make_callback after the callback has been invoked. If there is a pending exception then we need to avoid checking the result as that will not be able to complete properly. Add additional checks to the unit test for napi_make_callback to catch this case. PR-URL: nodejs#19362 Fixes: nodejs/node-addon-api#235 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Configuration menu - View commit details
-
Copy full SHA for 01790d4 - Browse repository at this point
Copy the full SHA 01790d4View commit details -
n-api: separate out async_hooks test
Place the test_make_callback async_hooks-related test into its own file. PR-URL: nodejs#19392 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Gabriel Schulhof committedApr 12, 2018 Configuration menu - View commit details
-
Copy full SHA for a19b829 - Browse repository at this point
Copy the full SHA a19b829View commit details -
n-api: add napi_fatal_exception
Add function to trigger and uncaught exception. Useful if an async callback throws an exception with no way to recover. PR-URL: nodejs#19337 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Configuration menu - View commit details
-
Copy full SHA for 9b1b810 - Browse repository at this point
Copy the full SHA 9b1b810View commit details -
n-api: re-write test_make_callback
This re-writes the test in C by dropping std::vector<napi_value> in favour of a C99 variable length array, and by dropping the anonymous namespace in favour of static function declarations. PR-URL: nodejs#19448 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Gabriel Schulhof committedApr 12, 2018 Configuration menu - View commit details
-
Copy full SHA for 3a50835 - Browse repository at this point
Copy the full SHA 3a50835View commit details -
PR-URL: nodejs#19555 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b25dec8 - Browse repository at this point
Copy the full SHA b25dec8View commit details -
n-api: bump version of n-api supported
Bump the version due to additions to the api. PR-URL: nodejs#19497 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Configuration menu - View commit details
-
Copy full SHA for c33daa4 - Browse repository at this point
Copy the full SHA c33daa4View commit details -
n-api: ensure in-module exceptions are propagated
Whenever we call into an addon, whether it is for a callback, for module init, or for async work-related reasons, we should make sure that * the last error is cleared, * the scopes before the call are the same as after, and * if an exception was thrown and captured inside the module, then it is re-thrown after the call. Therefore we should call into the module in a unified fashion. This change introduces the macro NAPI_CALL_INTO_MODULE() which should be used whenever invoking a callback provided by the module. Fixes: nodejs#19437 PR-URL: nodejs#19537 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Gabriel Schulhof committedApr 12, 2018 Configuration menu - View commit details
-
Copy full SHA for 65b06de - Browse repository at this point
Copy the full SHA 65b06deView commit details -
n-api: back up env before finalize
Heed the comment to not use fields of a Reference after calling its finalize callback, because such a call may destroy the Reference. Fixes: nodejs#19673 PR-URL: nodejs#19718 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Gabriel Schulhof committedApr 12, 2018 Configuration menu - View commit details
-
Copy full SHA for e3a2737 - Browse repository at this point
Copy the full SHA e3a2737View commit details -
* Updated tests for `Number` and `int32_t` * Added new tests for `int64_t` * Updated N-API `int64_t` behavior to return zero for all non-finite numbers * Clarified the documentation for these calls. PR-URL: nodejs#19402 Refs: nodejs/node-chakracore#500 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d73e802 - Browse repository at this point
Copy the full SHA d73e802View commit details