|
| 1 | +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Samuel Maddock < [email protected]> |
| 3 | +Date: Thu, 9 Oct 2025 23:25:59 -0400 |
| 4 | +Subject: fix: replace deprecated Get/SetPrototype |
| 5 | + |
| 6 | +https://chromium-review.googlesource.com/c/v8/v8/+/6983465 |
| 7 | + |
| 8 | +Replaces the deprecated usage of SetPrototype. |
| 9 | + |
| 10 | +diff --git a/nan_maybe_43_inl.h b/nan_maybe_43_inl.h |
| 11 | +index c04ce30d2fa3bfb555c96754d93de64e8a83e36b..aa06dbad2f0b3d564917dbcd29ac608ad468327b 100644 |
| 12 | +--- a/nan_maybe_43_inl.h |
| 13 | ++++ b/nan_maybe_43_inl.h |
| 14 | +@@ -207,7 +207,7 @@ inline Maybe<bool> SetPrototype( |
| 15 | + , v8::Local<v8::Value> prototype) { |
| 16 | + v8::Isolate *isolate = v8::Isolate::GetCurrent(); |
| 17 | + v8::HandleScope scope(isolate); |
| 18 | +- return obj->SetPrototype(isolate->GetCurrentContext(), prototype); |
| 19 | ++ return obj->SetPrototypeV2(isolate->GetCurrentContext(), prototype); |
| 20 | + } |
| 21 | + |
| 22 | + inline MaybeLocal<v8::String> ObjectProtoToString( |
| 23 | +diff --git a/nan_maybe_pre_43_inl.h b/nan_maybe_pre_43_inl.h |
| 24 | +index 83325ae0897f95f2fe5354e9ab720796a7cefd7c..c309ace8c69feb6d01f136d4c0a33443886c467a 100644 |
| 25 | +--- a/nan_maybe_pre_43_inl.h |
| 26 | ++++ b/nan_maybe_pre_43_inl.h |
| 27 | +@@ -174,7 +174,7 @@ MaybeLocal<v8::Array> GetOwnPropertyNames(v8::Handle<v8::Object> obj) { |
| 28 | + inline Maybe<bool> SetPrototype( |
| 29 | + v8::Handle<v8::Object> obj |
| 30 | + , v8::Handle<v8::Value> prototype) { |
| 31 | +- return Just<bool>(obj->SetPrototype(prototype)); |
| 32 | ++ return Just<bool>(obj->SetPrototypeV2(prototype)); |
| 33 | + } |
| 34 | + |
| 35 | + inline MaybeLocal<v8::String> ObjectProtoToString( |
0 commit comments