node/test/addons-napi
Michael Dawson 3e18c49657 n-api: avoid crash in napi_escape_scope()
V8 will crash if escape is called twice on the same
scope.

Add checks to avoid crashing if napi_escape_scope() is
called to try and do this.

Add test that tries to call napi_create_scope() twice.

PR-URL: https://github.com/nodejs/node/pull/13651
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-06-21 16:57:39 -04:00
..
1_hello_world
2_function_arguments
3_callbacks n-api: napi_get_cb_info should fill array 2017-05-09 15:12:15 -04:00
4_object_factory
5_function_factory
6_object_wrap
7_factory_wrap
8_passing_wrapped
test_array test: improve n-api array func coverage 2017-05-11 09:16:17 -04:00
test_async n-api: Handle fatal exception in async callback 2017-05-09 15:17:36 -04:00
test_buffer
test_constructor test: increase n-api constructor coverage 2017-05-23 21:05:30 +02:00
test_conversions
test_error test: add coverage for error apis 2017-05-05 04:57:54 -04:00
test_exception test: add common.mustCall() to NAPI exception test 2017-05-13 16:49:24 -07:00
test_function n-api: napi_get_cb_info should fill array 2017-05-09 15:12:15 -04:00
test_general src,lib,test,doc: correct misspellings 2017-06-17 19:17:46 +02:00
test_handle_scope n-api: avoid crash in napi_escape_scope() 2017-06-21 16:57:39 -04:00
test_make_callback test: port test for make_callback to n-api 2017-05-06 12:24:43 -04:00
test_make_callback_recurse test: port test for make_callback to n-api 2017-05-06 12:24:43 -04:00
test_number
test_object test: fix build warning in addons-napi/test_object 2017-06-05 16:34:13 -07:00
test_properties test: add coverage for napi_property_descriptor 2017-06-09 10:08:11 -04:00
test_reference test: Make N-API weak-ref GC tests asynchronous 2017-05-30 12:45:27 -07:00
test_string
test_symbol
test_typedarray test: improve n-api coverage for typed arrays 2017-05-30 13:50:45 -04:00
.gitignore
common.h
testcfg.py