chore: use v8::Local<>, not v8::Handle<> (#43037)

v8::Handle is an alias for v8::Local that "is kept around for historical
reasons" and is disabled when V8_IMMINENT_DEPRECATION_WARNING is defined

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2024-07-25 11:00:05 +02:00 committed by GitHub
parent 9e14f8d828
commit 097a3e9024
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 34 additions and 34 deletions

View file

@ -51,7 +51,7 @@ namespace gin {
template <>
struct Converter<char16_t> {
static bool FromV8(v8::Isolate* isolate,
v8::Handle<v8::Value> val,
v8::Local<v8::Value> val,
char16_t* out) {
std::u16string code = base::UTF8ToUTF16(gin::V8ToString(isolate, val));
if (code.length() != 1)
@ -106,7 +106,7 @@ struct Converter<char16_t> {
bool Converter<blink::WebInputEvent::Type>::FromV8(
v8::Isolate* isolate,
v8::Handle<v8::Value> val,
v8::Local<v8::Value> val,
blink::WebInputEvent::Type* out) {
std::string type = gin::V8ToString(isolate, val);
#define CASE_TYPE(event_type, js_name) \
@ -132,7 +132,7 @@ v8::Local<v8::Value> Converter<blink::WebInputEvent::Type>::ToV8(
template <>
struct Converter<blink::WebMouseEvent::Button> {
static bool FromV8(v8::Isolate* isolate,
v8::Handle<v8::Value> val,
v8::Local<v8::Value> val,
blink::WebMouseEvent::Button* out) {
using Val = blink::WebMouseEvent::Button;
static constexpr auto Lookup =
@ -191,7 +191,7 @@ static constexpr auto ReferrerPolicies =
template <>
struct Converter<blink::WebInputEvent::Modifiers> {
static bool FromV8(v8::Isolate* isolate,
v8::Handle<v8::Value> val,
v8::Local<v8::Value> val,
blink::WebInputEvent::Modifiers* out) {
return FromV8WithLowerLookup(isolate, val, Modifiers, out) ||
FromV8WithLowerLookup(isolate, val, ModifierAliases, out);
@ -660,7 +660,7 @@ v8::Local<v8::Value> Converter<network::mojom::ReferrerPolicy>::ToV8(
// static
bool Converter<network::mojom::ReferrerPolicy>::FromV8(
v8::Isolate* isolate,
v8::Handle<v8::Value> val,
v8::Local<v8::Value> val,
network::mojom::ReferrerPolicy* out) {
return FromV8WithLowerLookup(isolate, val, ReferrerPolicies, out);
}
@ -699,7 +699,7 @@ v8::Local<v8::Value> Converter<blink::CloneableMessage>::ToV8(
}
bool Converter<blink::CloneableMessage>::FromV8(v8::Isolate* isolate,
v8::Handle<v8::Value> val,
v8::Local<v8::Value> val,
blink::CloneableMessage* out) {
return electron::SerializeV8Value(isolate, val, out);
}