| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7a86108 commit 2dc1d20
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -191,7 +191,8 @@ MaybeLocal<Function> DynamicLibrary::CreateFunction( | |||
| 191 | 191 | ||
| 192 | 192 | FFIFunctionInfo* info = new FFIFunctionInfo(); | |
| 193 | 193 | info->fn = fn; | |
| 194 | - Local<External> data = External::New(isolate, info); | ||
| 194 | + Local<External> data = | ||
| 195 | + External::New(isolate, info, v8::kExternalPointerTypeTagDefault); | ||
| 195 | 196 | MaybeLocal<Function> maybe_ret = | |
| 196 | 197 | Function::New(env->context(), DynamicLibrary::InvokeFunction, data); | |
| 197 | 198 | Local<Function> ret; | |
@@ -274,8 +275,8 @@ void DynamicLibrary::Close(const FunctionCallbackInfo<Value>& args) { | |||
| 274 | 275 | ||
| 275 | 276 | void DynamicLibrary::InvokeFunction(const FunctionCallbackInfo<Value>& args) { | |
| 276 | 277 | 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)); | ||
| 279 | 280 | FFIFunction* fn = info->fn.get(); | |
| 280 | 281 | ||
| 281 | 282 | if (fn == nullptr || fn->closed || fn->ptr == nullptr) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments