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
|
@ -106,7 +106,9 @@ class Dictionary {
|
|||
bool SetMethod(const base::StringPiece& key, const T& callback) {
|
||||
return GetHandle()->Set(
|
||||
StringToV8(isolate_, key),
|
||||
CallbackTraits<T>::CreateTemplate(isolate_, callback)->GetFunction());
|
||||
CallbackTraits<T>::CreateTemplate(isolate_, callback)
|
||||
->GetFunction(isolate_->GetCurrentContext())
|
||||
.ToLocalChecked());
|
||||
}
|
||||
|
||||
bool Delete(const base::StringPiece& key) {
|
||||
|
|
|
@ -39,7 +39,8 @@ void WrappableBase::InitWith(v8::Isolate* isolate,
|
|||
// Call object._init if we have one.
|
||||
v8::Local<v8::Function> init;
|
||||
if (Dictionary(isolate, wrapper).Get("_init", &init))
|
||||
init->Call(wrapper, 0, nullptr);
|
||||
init->Call(isolate->GetCurrentContext(), wrapper, 0, nullptr)
|
||||
.ToLocalChecked();
|
||||
|
||||
AfterInit(isolate);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue