MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / escapeFromExistingScope

Function escapeFromExistingScope

test/handlescope.cc:35–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35Value escapeFromExistingScope(const CallbackInfo& info) {
36 Value result;
37 {
38 napi_escapable_handle_scope scope;
39 napi_open_escapable_handle_scope(info.Env(), &scope);
40 EscapableHandleScope scope_existing(info.Env(), scope);
41 result = scope_existing.Escape(
42 String::New(scope_existing.Env(), "inner-existing-scope"));
43 }
44 return result;
45}
46
47#define LOOP_MAX 1000000
48Value stressEscapeFromScope(const CallbackInfo& info) {

Callers

nothing calls this directly

Calls 2

EnvMethod · 0.80
EscapeMethod · 0.80

Tested by

no test coverage detected