Commit c3eb187b authored by Michael Dawson's avatar Michael Dawson Committed by Myles Borins
Browse files

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.

Backport-PR-URL: https://github.com/nodejs/node/pull/19447
PR-URL: https://github.com/nodejs/node/pull/13651


Reviewed-By: default avatarJason Ginchereau <jasongin@microsoft.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
parent cc3a4af7
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment