-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
[6.x] n-api: backport to v6.x #19447
Closed
gabrielschulhof
wants to merge
183
commits into
nodejs:v6.x-staging
from
gabrielschulhof:v6.x-backport-n-api
Closed
Changes from all commits
Commits
Show all changes
183 commits
Select commit
Hold shift + click to select a range
146f554
n-api: add support for abi stable module API
jasongin 7a43dd2
n-api: break dep between v8 and napi attributes
mhdawson 6244224
napi: supress invalid coverity leak message
mhdawson 69fe5ae
n-api: create napi_env as a real structure
8047b41
n-api: Update property attrs enum to match JS spec
jasongin 7afb3bc
n-api: cache Symbol.hasInstance
1459aea
napi: initialize and check status properly
630b4bf
n-api: change napi_callback to return napi_value
boingoing 257b28c
n-api: implement async helper methods
boingoing e6055bb
n-api: fix -Wmismatched-tags compiler warning
bnoordhuis 3e6db1f
test: improve test coverage for n-api
mhdawson a5d892d
test: add second argument to assert.throws
targos d26cbed
test: fix compiler warning in n-api test
addaleax 13261d9
n-api: add string api for latin1 encoding
89e816b
n-api: fix coverity scan report
mhdawson 476b4ff
test: port test for make_callback to n-api
digitalinfinity 4414e2b
Revert "test: port test for make_callback to n-api"
jasnell 7a093c2
n-api: remove napi_get_value_string_length()
jasongin 89e85e7
n-api: tighten null-checking and clean up last error
4653b67
n-api: Enable scope and ref APIs during exception
jasongin f7488e7
test: test doc'd napi_get_value_int32 behaviour
mhdawson 1afabfc
test: add coverage for napi_cancel_async_work
mhdawson 624a448
n-api: Reference and external tests
jasongin 406f4ce
n-api: Sync with back-compat changes
jasongin 9189c86
doc: Add initial documentation for N-API
mhdawson 3461bc1
test: replace indexOf with includes
gwer b91ac10
test,lib,doc: use function declarations
Trott e89a911
n-api: remove unnecessary try-catch bracket from certain APIs
f14a0bb
test: fix warning in n-api reference test
mhdawson 269e921
test: add coverage for error apis
mhdawson ed2ef69
test: port test for make_callback to n-api
digitalinfinity 7491cee
test: fix napi test_reference for recent V8
targos 61992ff
n-api: napi_get_cb_info should fill array
jasongin 184ffb5
n-api: Handle fatal exception in async callback
jasongin b69818d
doc: fix broken links in n-api doc
mhdawson 17d8b55
test: improve n-api array func coverage
mhdawson ce0e121
doc: clarify node.js addons are c++
BethGriggs bdd1375
test: add common.mustCall() to NAPI exception test
Trott ba2594e
doc: clarify operation of napi_cancel_async_work
mhdawson 67e0372
test: improve N-API test coverage
mhdawson d572c9c
n-api: remove compiler warning
addaleax b10fe3e
test: Improve N-API test coverage
mhdawson 726d584
n-api: Retain last code when getting error info
jasongin f7232ad
doc: add reference to node_api.h in docs
mhdawson 2e48f58
doc: fix title/function name mismatch
mhdawson 4d730be
test: increase n-api constructor coverage
mhdawson 278ba33
src: correct endif comment SRC_NODE_API_H__
danbev 54bd4b5
test: add coverage for napi_has_named_property
mhdawson 5c0c021
n-api: add napi_get_version
mhdawson 5c19e28
test: improve n-api coverage for typed arrays
mhdawson 8653a1b
test: Make N-API weak-ref GC tests asynchronous
jasongin 897bac2
doc: fix typo in n-api.md
disjukr 2249581
n-api: enable napi_wrap() to work with any object
jasongin 2052c6a
test: consolidate n-api test addons
mhdawson d572b0f
test: consolidate n-api test addons - part2
mhdawson 28cf8f0
test: fix build warning in addons-napi/test_object
jasongin 45be27f
doc: add ref to option to enable n-api
mhdawson 8a96551
doc: fix typo "ndapi" in n-api.md
01302b1
doc: fix out of date sections in n-api doc
mhdawson 02e7b63
test: add coverage for napi_property_descriptor
mhdawson 2ff7692
doc: fix napi_create_*_error signatures in n-api
jamen 2b94a31
doc: fix out of date napi_callback doc
XadillaX 00ee027
doc: fix a few n-api doc issues
mhdawson f680c08
n-api: avoid crash in napi_escape_scope()
mhdawson 512fc32
doc: doc lifetime of n-api last error info
mhdawson 947b1cd
n-api: fix section title typo
kfarnung 922ea46
test: verify napi_get_property() walks prototype
cjihrig ae0bdd5
n-api: add napi_delete_element()
cjihrig 22b9a87
n-api: add napi_delete_property()
cjihrig c95b561
n-api: use Maybe version of Object::SetPrototype()
bnoordhuis c5c580c
n-api: fix -Wmaybe-uninitialized compiler warning
bnoordhuis 134d7a1
test: add coverage for napi_typeof
mhdawson 35b3c61
N-API: Reuse ObjectTemplate instances
bb5a56e
n-api: add napi_has_own_property()
cjihrig c8ae23e
n-api: fix warning in test_general
danbev 99fc87e
n-api: Implement stricter wrapping
1536f37
n-api: wrap test macros in do/while
kfarnung fb572c4
test: handle missing V8 tests in n-api test
cjihrig 5278223
n-api: add code parameter to error helpers
mhdawson 25e46c5
n-api: add napi_fatal_error API
kfarnung bc83e71
test: replace string concat with template literal
4garfield e885661
doc: fix some links
vsemozhetbyt 55e3ca8
n-api: add fast paths for integer getters
addaleax 39ce757
n-api: directly create Local from Persistent
kfarnung 8fab9bc
test: changed error message validator
pratik0509 b5ef731
n-api: re-use napi_env between modules
1fe2004
n-api: add support for DataView
shivanth fb41b01
doc: document napi_finalize() signature
cjihrig 3be9e95
src: replace assert with CHECK_LE in node_api.cc
bnoordhuis 2ae281e
n-api: optimize number API performance
jasongin 11427ca
n-api: add napi_get_node_version
addaleax 7ca8b1d
test: use regular expressions in throw assertions
vincentcn ca8eaa2
doc: delint
refack b0abcbf
doc: added napi_get_value_string_latin1
kfarnung f3a8d0a
n-api: add ability to remove a wrapping
41b7f4c
doc: fix doc for napi_get_value_string_utf8
6ec485a
test: remove unused parameters
human33 2bab64e
n-api: implement promise
28786e2
n-api: adds function to adjust external memory
32504e1
n-api: implement napi_run_script
63e8605
n-api: stop creating references to primitives
9c68371
n-api: use AsyncResource for Work tracking
addaleax 14dc0f8
n-api: change async resource name to napi_value
jasongin ab1870a
n-api: refactor napi_addon_register_func
boingoing edfbc5b
n-api: Context for custom async operations
jasongin 574f09e
n-api: napi_is_construct_call->napi_get_new_target
7fb617b
n-api: add optional string length parameters
a61dd4b
n-api: remove n-api module loading flag
ccc321d
doc: fix new nits in links
vsemozhetbyt 3f8e900
n-api: fix warning about size_t compare with int
c683497
doc: fix outdated code sample in n-api.md
rebornix 7e6c9f1
n-api: add check for large strings
mhdawson 1b2c2a9
test: remove template literal
emilyford f589058
test: fix race condition in addon test
kkwoker b225e66
test: cleaned up assert messages
mrgorbo 2e2b48b
n-api: make changes for source compatibility
45205f0
n-api,test: use module name macro
ae88690
test: remove redundant error messages
239859f
doc: fix some links
vsemozhetbyt 6456daf
doc: update to use NAPI_AUTO_LENGTH
mhdawson a20e0d5
n-api: use module name macro
mhdawson 96d1334
n-api: check against invalid handle scope usage
addaleax dd2a60e
n-api: unexpose symbols and remove EXTERNAL_NAPI
e2b58ab
test: improve message for assert.strictEqual()
Deep-Six 6674c17
test: include actual value in assertion message
mattcan ec2c784
test: use default assertion messages
trootski 4c8826f
test: add detailed message for assertion failure
pcdevil cc202a5
test: improve assert messages in napi exception test
PaulBlanche bfeeeb3
doc: fix a typo in n-api documentation
vipinmenon ab95aa4
test: improve error emssage reporting in testNapiRun.js
f3cfc2f
doc: fix typos in N-API
SwathiKalahastri c15b4ee
test: refactor addons-napi/test_promise/test.js
ka3e f450931
doc: document common pattern for instanceof checks
mhdawson d21b9a5
n-api: add helper for addons to get the event loop
addaleax c04169d
src: add napi_handle_scope_mismatch to msg list
32dd8f1
doc: use "JavaScript" instead of "Javascript"
Trott 45a3e6b
n-api: use nullptr instead of NULL in node_api.cc
danbev d9dc130
doc: update example in module registration
fhinkel 3f4ac09
test: replace assert.throws with common.expectsError
Leko a005c30
test: add unhandled rejection guard
babygoat 2515f51
test: remove literals that obscure assert messages
Trott 825468f
n-api: fix memory leak in napi_async_destroy()
6d5b622
test: remove ambiguous error messages from test_error
nadrane 968d757
doc: updates examples to use NULL
mhdawson 2f92a07
n-api: throw RangeError in napi_create_dataview() with invalid range
romandev 9dc08ae
n-api: expose n-api version in process.versions
mhdawson edb244f
doc: napi: fix unbalanced emphasis
ofrobots 85b964b
doc: napi: make header style consistent
ofrobots 5d06fab
n-api: throw RangeError napi_create_typedarray()
romandev e32cca2
test: fixed typos in napi test
furstenheim 91c9e19
doc: remove uannecessary Require
mhdawson f103e21
test: refactor addons-napi/test_exception/test.js
Trott 0fd8ceb
n-api: change assert ok check to notStrictEqual.
nbdaaron e57f34c
test: show pending exception error in napi tests
reccanti 5c183d7
n-api: implement wrapping using private properties
76dfefa
n-api: wrap control flow macro in do/while
bnoordhuis b7093fa
doc: remove usage of you in n-api doc
mhdawson ed7e64b
doc: small typo in n-api.md
iSkore 63d1f02
n-api: add methods to open/close callback scope
mhdawson d75fbeb
n-api: remove extra reference from test
4753369
doc: fix typo in n-api.md
vsemozhetbyt c7f4a4f
test: improve error message output
bshankar 85728d1
test: convert new tests to use error types
jackhorton 4950772
doc: fix exporting a function example
7996463
doc: mark NAPI_AUTO_LENGTH as code
tniessen a12f442
test: remove unnecessary timer
cjihrig 8786335
n-api: fix object test
0efd826
doc: fix n-api asynchronous threading docs
ebickle cab6ce9
n-api: update reference test
ab4763d
n-api: update documentation
a5ec82f
n-api: resolve promise in test
b0e458a
n-api,test: add a new.target test to addons-napi
boingoing f07b614
n-api: take n-api out of experimental
mhdawson fdd3f57
n-api,test: add int64 bounds tests
kfarnung 7c784de
doc: fix typos on n-api
shama dd61f8e
n-api: add missing exception checking
mhdawson 78ccedf
n-api: add napi_fatal_exception
mafintosh 6b12016
n-api: re-write test_make_callback
041c9a0
doc: Add a missing comma
leaves4j 96fe46b
n-api: bump version of n-api supported
mhdawson f4b0f7a
n-api: ensure in-module exceptions are propagated
dc4c825
n-api: back up env before finalize
f498a62
n-api: add more `int64_t` tests
kfarnung File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!