- Apr 11, 2017
-
-
taylor.woll authored
Based on the async methods we had in abi-stable-node before the napi feature landed in node/master. Changed this set of APIs to handle error cases and removed a lot of the extra methods we had for setting all the pieces of napi_work opting instead to pass all of those as arguments to napi_create_async_work as none of those parameters are optional except for the complete callback, anyway. Renamed the napi_work struct to napi_async_work and replace the struct itself with a class which can better encapsulate the object lifetime and uv_work_t that we're trying to wrap anyway. Added a napi_async_callback type for the async helper callbacks instead of taking raw function pointers and make this callback take a napi_env parameter as well as the void* data it was already taking. Call the complete handler for the async work item with a napi_status code translated from the uvlib error code. The execute callback is required for napi_create_async_work, though complete callback is still optional. Also added some async unit tests for addons-napi based on the addons/async_hello_world test. PR-URL: https://github.com/nodejs/node/pull/12250 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Timothy Gu <timothygu99@gmail.com> Reviewed-By:
Hitesh Kanwathirtha <hiteshk@microsoft.com>
-
Taylor Woll authored
Change `napi_callback` to return `napi_value` directly instead of requiring `napi_set_return_value`. When we invoke the callback, we will check the return value and call `SetReturnValue` ourselves. If the callback returns `NULL`, we don't set the return value in v8 which would have the same effect as previously if the callback didn't call `napi_set_return_value`. Seems to be a more natural way to handle return values from callbacks. As a consequence, remove `napi_set_return_value`. Add a `napi_value` to `napi_property_descriptor` to support string values which couldn't be passed in the `utf8name` parameter or symbols as property names. Class names, however, cannot be symbols so this `napi_value` must be a string type in that case. Remove all of the `napi_callback_info` helpers except for `napi_get_cb_info` and make all the parameters to `napi_get_cb_info` optional except for argc. Update all the test collateral according to these changes. Also add `test/addons-napi/common.h` to house some common macros for wrapping N-API calls and error handling. PR-URL: https://github.com/nodejs/node/pull/12248 Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Daijiro Wachi authored
It should trim the slashes after the colon into three for file URL. PR-URL: https://github.com/nodejs/node/pull/12203 Refs: https://github.com/w3c/web-platform-tests/pull/5195 Fixes: https://github.com/nodejs/node/issues/11188 Reviewed-By:
Timothy Gu <timothygu99@gmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com>
-
- Apr 10, 2017
-
-
Tobias Nießen authored
Forced conversion of the encoding parameter to a string within crypto.js, fixing segmentation faults in node_crypto.cc. Fixes: https://github.com/nodejs/node/issues/9819 PR-URL: https://github.com/nodejs/node/pull/12164 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Sam Roberts authored
A dynamically allocated array was being used, simplify the memory management by using std::vector. PR-URL: https://github.com/nodejs/node/pull/12241 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Karl Cheng authored
parallel/test-crypto-dh.js assumes particular curve algorithms (e.g. Oakley-EC2N-3) are supported, though this may not necessarily be the case if Node.js was built with a system version of OpenSSL. PR-URL: https://github.com/nodejs/node/pull/12265 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Vse Mozhet Byt authored
PR-URL: https://github.com/nodejs/node/pull/12282 Fixes: https://github.com/nodejs/node/issues/12280 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Gibson Fahnestock <gibfahn@gmail.com>
-
Daniel Bevenius authored
This change was suggested by bnoordhuis in the following comment: https://github.com/nodejs/node/pull/9163#discussion_r84264628 Not including any tests as this is covered by test/addons/at-exit. PR-URL: https://github.com/nodejs/node/pull/12255 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Daniel Bevenius authored
I'm currently seeing a timeout error for test-signal-handler.js on macosx when using the following configuration: ./configure --debug --without-ssl && make -j8 test --without-ssl implies that there will be no inspector but the signal SIGUSR1 is blocked in PlatformInit just the same. But in this case never unblocked which is causing the signal to never be delivered to the handlers in test-signal-handler.js and it loops until it times out. Not sure if this is the best way of fixing this but hopefully more eyes on this will help. PR-URL: https://github.com/nodejs/node/pull/12266 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Jan Krems authored
* Since https://github.com/nodejs/node/pull/6559 known_issues does run on CI. * Add some notes to explain the expectations around tests in known_issues. PR-URL: https://github.com/nodejs/node/pull/12262 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Gibson Fahnestock authored
The addons-napi testsuite is already included in $(CI_NATIVE_SUITES), so we don't need to manually specify it in the test-ci target as well. PR-URL: https://github.com/nodejs/node/pull/12201 Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
- Apr 09, 2017
-
-
Sam Roberts authored
A std::string manages its own memory, so using one removes the implicit assumption that the argv vector passed to node will never be deallocated. Also, the enabled_categories are used to construct a std::stringstream, so its simpler to use the standard library consistently. PR-URL: https://github.com/nodejs/node/pull/12242 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com>
-
Joyee Cheung authored
PR-URL: https://github.com/nodejs/node/pull/12121 Refs: https://github.com/nodejs/node/issues/12068 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Joyee Cheung authored
PR-URL: https://github.com/nodejs/node/pull/12121 Refs: https://github.com/nodejs/node/issues/12068 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Joyee Cheung authored
Refactor benchmark/_http-benchmarkers.js and add a test double HTTP benchmarker for testing. PR-URL: https://github.com/nodejs/node/pull/12121 Refs: https://github.com/nodejs/node/issues/12068 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Uppinder Chugh authored
PR-URL: https://github.com/nodejs/node/pull/12256 Fixes: https://github.com/nodejs/node/issues/12161 Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Roman Reiss <me@silverwind.io> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Rich Trott authored
Use no-restricted-syntax to implement the requirement that `Error` objects must be thrown with the `new` keyword. PR-URL: https://github.com/nodejs/node/pull/12249 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:
Teddy Katz <teddy.katz@gmail.com> Reviewed-By:
Gibson Fahnestock <gibfahn@gmail.com>
-
Timothy Gu authored
PR-URL: https://github.com/nodejs/node/pull/12254 Refs: https://github.com/nodejs/node/issues/11875 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Evan Lucas <evanlucas@me.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Josh Gavant <josh.gavant@outlook.com>
-
- Apr 08, 2017
-
-
Gabriel Schulhof authored
Initialize status to napi_generic_failure and only check it after having made an actual N-API call. This fixes up 8fbace16. PR-URL: https://github.com/nodejs/node/pull/12283 Ref: https://github.com/nodejs/node/pull/12279 Reviewed-By:
Refael Ackermann <refack@gmail.com>
-
Vse Mozhet Byt authored
PR-URL: https://github.com/nodejs/node/pull/12247 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Sam Roberts <vieuxtech@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Alexey Orlenko <eaglexrlnk@gmail.com>
-
Vse Mozhet Byt authored
* Replace `var` by `const`. * Fix semicolons. * Add missing code marks. * Unify quotes. * Comment out ellipsis. * Use object destructuring. * Use exponentiation operator. * Replace snake_case by camelCase. PR-URL: https://github.com/nodejs/node/pull/12224 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Alexey Orlenko <eaglexrlnk@gmail.com>
-
Gibson Fahnestock authored
Can be cc'ed with `@nodejs/performance`. PR-URL: https://github.com/nodejs/node/pull/12213 Refs: https://github.com/nodejs/node/pull/12194#issuecomment-291477258 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
Alexey Orlenko authored
This commit adds C++ tests for `base64_encode()` and `base64_decode()` functions defined in `base64.h`. The functionality is already being tested indirectly in JavaScript tests for Buffer, but it won't hurt to test the low-level functions too, especially given that they aren't only used in the internal Buffer implementation, Chrome inspector protocol support relies upon them too. PR-URL: https://github.com/nodejs/node/pull/12238 Refs: https://github.com/nodejs/node/pull/12146#issuecomment-291559685 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com>
-
Gabriel Schulhof authored
This improves the performance of napi_instanceof() by retrieving Symbol.hasInstance from the global object once and then storing a persistent reference to it in the env. PR-URL: https://github.com/nodejs/node/pull/12246 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
Refael Ackermann authored
PR-URL: https://github.com/nodejs/node/pull/12277 Refs: https://github.com/nodejs/node/blob/master/doc/onboarding.md Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com>
-
Rich Trott authored
6481c93a modified `lib/assert.js` and added some tests for new functionality, but left a single line uncovered by tests. This adds a test that covers the currently-uncovered line (which is the final `return` statement in `setHasSimilarElement()`).` PR-URL: https://github.com/nodejs/node/pull/12239 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Michael Dawson authored
Update OS level supprot for AIX. Based on discussions with the AIX team we've have decided that the minimum support level should be 7.1. This is because support for AIX 6.1 will likely end during the lifespan of the upcoming Node version 8 release. PR-URL: https://github.com/nodejs/node/pull/12235 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Sam Roberts <vieuxtech@gmail.com> Reviewed-By:
Gibson Fahnestock <gibfahn@gmail.com>
-
Alexey Orlenko authored
Add Alexey Orlenko (@aqrln) to the list of collaborators in README.md PR-URL: https://github.com/nodejs/node/pull/12273 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Steven authored
PR-URL: https://github.com/nodejs/node/pull/12233 Reviewed-By:
Timothy Gu <timothygu99@gmail.com> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
- Apr 07, 2017
-
-
Jason Ginchereau authored
The napi_property_attributes enum used names and values from v8::PropertyAttribute, but those negative flag names were outdated along with the default behavior of a property being writable, enumerable, and configurable unless otherwise specified. To match the ES5 standard property descriptor those attributes should be positive flags and should default to false unless otherwise specified. PR-URL: https://github.com/nodejs/node/pull/12240 Fixes: https://github.com/nodejs/abi-stable-node/issues/221 Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Timothy Gu <timothygu99@gmail.com>
-
dave-k authored
- a regular expression that matches the entire error message. PR-URL: https://github.com/nodejs/node/pull/12139 Reviewed-By:
Rich Trott <rtrott@gmail.com> 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:
Prince John Wesley <princejohnwesley@gmail.com>
-
Rich Trott authored
Skip test-cluster-disconnect-handles on Windows. PR-URL: https://github.com/nodejs/node/pull/12261 Ref: https://github.com/nodejs/node/pull/12197#issuecomment-292228866 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Eugene Ostroukhov authored
This pull request switches the signal handler to start inspector socket server instead of the legacy V8 debug protocol. PR-URL: https://github.com/nodejs/node/pull/11431 Fixes: https://github.com/nodejs/node/issues/8464 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
- Apr 06, 2017
-
-
Jan Krems authored
In the 2017-04-05 meeting, the CTC agreed to remove support for the legacy debugger in 8.0.0. This is the first step in this direction. Refs: https://github.com/nodejs/CTC/issues/94 PR-URL: https://github.com/nodejs/node/pull/12197 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Myles Borins <myles.borins@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com>
-
Refael Ackermann authored
Intention was to get to `PRODUCT_DIR` so no need to do path voodoo Also added `'msvs_quote_cmd': 0` and more precise quoting PR-URL: https://github.com/nodejs/node/pull/11217 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By:
Steven R Loomis <srloomis@us.ibm.com>
-
Daniel Bevenius authored
This commit adds lldbinit files from upstream V8 and also adds these so that they get installed when `make install` is run. Original commit message: [tools] add lldbinit The goal of this commit is to add the equivalent to gdbinit but for lldb. I've tried to replicate the commands as close as possible but I'm unsure about the jss command and hoping to get some feedback on it in addition to the bta command which I'm not sure how/when this could be used. This is probably just inexperience on my part. The lldbinit file can be placed into a directory prefixed with dot (.lldbinit) and the python script is currently expected to be in the same directory. The path to the script can be changed manually if needed as well. NOTRY=true Review-Url: https://codereview.chromium.org/2758373002 Cr-Commit-Position: refs/heads/master@{#44136} PR-URL: https://github.com/nodejs/node/pull/12061 Reviewed-By:Ben Noordhuis <info@bnoordhuis.nl>
-
Rich Trott authored
The current debugger is slated for removal soon. The debugger test that has been disabled for over four years is unlikely to be repaired at this point. Remove the test and its associated fixture. PR-URL: https://github.com/nodejs/node/pull/12199 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By:
Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com>
-
Rich Trott authored
Putting the link for the commit guideline at the bottom of the pull request template makes it a bit confusing when opening a pull request as the markdown does not render. Not everyone is familiar with the syntax used there and it is easy to mess it up (for example, by not leaving a blank line above it). It is more natural and useful if the URL is included inline. PR-URL: https://github.com/nodejs/node/pull/12216 Reviewed-By:
Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Sam Roberts <vieuxtech@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Timothy Gu <timothygu99@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
alejandro authored
Because the final array length is known, it's better to allocate its final length at initialization time to avoid future reallocations. Also add an explicit buffer length greater than 0 comparison so it's more readable, avoids the internal ToBoolean call and follows the standard Node.js API format (as it can be checked in other similar structures where 'length > 0' is preferred over 'length') PR-URL: https://github.com/nodejs/node/pull/11733 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Brian White <mscdex@mscdex.net>
-
Matt Loring authored
src/tracing/trace_event.h was updated by applying the following changes: 1) Include src/tracing/trace_event_common.h instead of the one from v8 base. 2) Replace all instances of base::Atomic with intptr_t (trace events can only be generated from the main thread for now). 3) Replace instances of V8_INLINE with inline. 4) Eliminate uses of DCHECK. 5) Eliminate uses of V8_UNLIKELY, the branch predictor should be good enough alone. 6) Change the namespace used by trace_event.h from v8::internal::tracing to node::tracing. 7) Remove CallStatsScopedTracer class and related macros (they rely on V8 implementation details). 8) Change ConvertableToTraceFormat to v8::ConvertableToTraceFormat. 9) Add function "static void SetCurrentPlatform(v8::Platform* platform);" to the declaration of TraceEventHelper. PR-URL: https://github.com/nodejs/node/pull/12127 Reviewed-By:
Ali Ijaz Sheikh <ofrobots@google.com>
-