GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — n-api: improve consistency of how we get context · nodejs/node@dde727e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • js_native_api_v8.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/js_native_api_v8.cc‎

Copy file name to clipboardExpand all lines: src/js_native_api_v8.cc
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ inline static napi_status ConcludeDeferred(napi_env env,
169169
NAPI_PREAMBLE(env);
170170
CHECK_ARG(env, result);
171171

172-
v8::Local<v8::Context> context = env->isolate->GetCurrentContext();
172+
v8::Local<v8::Context> context = env->context();
173173
v8impl::Persistent<v8::Value>* deferred_ref =
174174
NodePersistentFromJsDeferred(deferred);
175175
v8::Local<v8::Value> v8_deferred =
@@ -385,8 +385,7 @@ inline static napi_status Unwrap(napi_env env,
385385
CHECK_ARG(env, result);
386386
}
387387

388-
v8::Isolate* isolate = env->isolate;
389-
v8::Local<v8::Context> context = isolate->GetCurrentContext();
388+
v8::Local<v8::Context> context = env->context();
390389

391390
v8::Local<v8::Value> value = v8impl::V8LocalValueFromJsValue(js_object);
392391
RETURN_STATUS_IF_FALSE(env, value->IsObject(), napi_invalid_arg);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.