refactor: replace v8::Local<T>::Cast() with As<T>() (#29097)

This commit is contained in:
Milan Burda 2021-05-12 09:38:21 +02:00 committed by GitHub
parent e01faedaa5
commit a51aaeb28f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 31 additions and 34 deletions

View file

@ -133,7 +133,7 @@ class Promise : public PromiseBase {
v8::Context::Scope context_scope(GetContext());
v8::Local<v8::Value> value = gin::ConvertToV8(isolate(), std::move(cb));
v8::Local<v8::Function> handler = v8::Local<v8::Function>::Cast(value);
v8::Local<v8::Function> handler = value.As<v8::Function>();
return GetHandle()->Then(GetContext(), handler);
}