Skip to content

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.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows [commit guidelines]
Affected core subsystem(s)

n-api

Merge request reports

Loading