| 33 | } |
| 34 | |
| 35 | Value 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 |
| 48 | Value stressEscapeFromScope(const CallbackInfo& info) { |