0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/addons-napi/test_handle_scope
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
..
binding.gyp
test_handle_scope.c n-api: avoid crash in napi_escape_scope() 2017-06-21 16:57:39 -04:00
test.js n-api: avoid crash in napi_escape_scope() 2017-06-21 16:57:39 -04:00