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 — src: replace uses of deprecated v8::External APIs · nodejs/node@2dc1d20

File tree

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

‎src/node_ffi.cc‎

Copy file name to clipboardExpand all lines: src/node_ffi.cc
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ MaybeLocal<Function> DynamicLibrary::CreateFunction(
191191

192192
FFIFunctionInfo* info = new FFIFunctionInfo();
193193
info->fn = fn;
194-
Local<External> data = External::New(isolate, info);
194+
Local<External> data =
195+
External::New(isolate, info, v8::kExternalPointerTypeTagDefault);
195196
MaybeLocal<Function> maybe_ret =
196197
Function::New(env->context(), DynamicLibrary::InvokeFunction, data);
197198
Local<Function> ret;
@@ -274,8 +275,8 @@ void DynamicLibrary::Close(const FunctionCallbackInfo<Value>& args) {
274275

275276
void DynamicLibrary::InvokeFunction(const FunctionCallbackInfo<Value>& args) {
276277
Environment* env = Environment::GetCurrent(args);
277-
FFIFunctionInfo* info =
278-
static_cast<FFIFunctionInfo*>(args.Data().As<External>()->Value());
278+
FFIFunctionInfo* info = static_cast<FFIFunctionInfo*>(
279+
args.Data().As<External>()->Value(v8::kExternalPointerTypeTagDefault));
279280
FFIFunction* fn = info->fn.get();
280281

281282
if (fn == nullptr || fn->closed || fn->ptr == nullptr) {

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.