From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Maddock <smaddock@slack-corp.com>
Date: Thu, 9 Oct 2025 23:25:59 -0400
Subject: fix: replace deprecated Get/SetPrototype

https://chromium-review.googlesource.com/c/v8/v8/+/6983465

Replaces the deprecated usage of SetPrototype.

diff --git a/nan_maybe_43_inl.h b/nan_maybe_43_inl.h
index f37ce9732d556b58e4b755e1688cfb481ee40b61..8c3362e5d9dfeac385089100bf6414f628a98f33 100644
--- a/nan_maybe_43_inl.h
+++ b/nan_maybe_43_inl.h
@@ -207,7 +207,7 @@ inline Maybe<bool> SetPrototype(
   , v8::Local<v8::Value> prototype) {
   v8::Isolate *isolate = v8::Isolate::GetCurrent();
   v8::HandleScope scope(isolate);
-  return obj->SetPrototype(isolate->GetCurrentContext(), prototype);
+  return obj->SetPrototypeV2(isolate->GetCurrentContext(), prototype);
 }
 
 inline MaybeLocal<v8::String> ObjectProtoToString(
diff --git a/nan_maybe_pre_43_inl.h b/nan_maybe_pre_43_inl.h
index 84e2c11c26d5706bf345d347bc405b90bd14607c..4e0cfa183405142aa3013080d0f938dd2d731168 100644
--- a/nan_maybe_pre_43_inl.h
+++ b/nan_maybe_pre_43_inl.h
@@ -174,7 +174,7 @@ MaybeLocal<v8::Array> GetOwnPropertyNames(v8::Handle<v8::Object> obj) {
 inline Maybe<bool> SetPrototype(
     v8::Handle<v8::Object> obj
   , v8::Handle<v8::Value> prototype) {
-  return Just<bool>(obj->SetPrototype(prototype));
+  return Just<bool>(obj->SetPrototypeV2(prototype));
 }
 
 inline MaybeLocal<v8::String> ObjectProtoToString(
