migrate to non-deprecated v8 functions
https://bugs.chromium.org/p/v8/issues/detail?id=8238
https://bugs.chromium.org/p/v8/issues/detail?id=7295
1352273
This commit is contained in:
parent
7d5cd2051a
commit
d01db5a656
26 changed files with 94 additions and 46 deletions
|
@ -55,8 +55,10 @@ struct V8FunctionInvoker<v8::Local<v8::Value>(ArgTypes...)> {
|
|||
v8::Local<v8::Context> context = holder->CreationContext();
|
||||
v8::Context::Scope context_scope(context);
|
||||
std::vector<v8::Local<v8::Value>> args{ConvertToV8(isolate, raw)...};
|
||||
v8::Local<v8::Value> ret(holder->Call(
|
||||
holder, args.size(), args.empty() ? nullptr : &args.front()));
|
||||
v8::Local<v8::Value> ret(holder
|
||||
->Call(context, holder, args.size(),
|
||||
args.empty() ? nullptr : &args.front())
|
||||
.ToLocalChecked());
|
||||
return handle_scope.Escape(ret);
|
||||
}
|
||||
};
|
||||
|
@ -76,7 +78,10 @@ struct V8FunctionInvoker<void(ArgTypes...)> {
|
|||
v8::Local<v8::Context> context = holder->CreationContext();
|
||||
v8::Context::Scope context_scope(context);
|
||||
std::vector<v8::Local<v8::Value>> args{ConvertToV8(isolate, raw)...};
|
||||
holder->Call(holder, args.size(), args.empty() ? nullptr : &args.front());
|
||||
holder
|
||||
->Call(context, holder, args.size(),
|
||||
args.empty() ? nullptr : &args.front())
|
||||
.ToLocalChecked();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue