Skip to content

Commit 23005cb

Browse files
targosjoyeecheung
authored andcommitted
src,test: replace use of removed GetPrototypeV2 API
Co-Authored-By: Joyee Cheung <joyeec9h3@gmail.com> Signed-Off-By: Michaël Zasso <targos@protonmail.com> Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
1 parent 37423d2 commit 23005cb

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/node_util.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ void Initialize(Local<Object> target,
513513

514514
{
515515
const Local<Object> prototype =
516-
SharedArrayBuffer::New(isolate, 0)->GetPrototypeV2().As<Object>();
516+
SharedArrayBuffer::New(isolate, 0)->GetPrototype().As<Object>();
517517
const Local<Object> descriptor =
518518
prototype
519519
->GetOwnPropertyDescriptor(

‎test/cctest/test_node_ipc_serdes.cc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ TEST_F(IPCSerdesTest, RoundTripsTypedArray) {
175175
// A plain Uint8Array must not come back as a Node Buffer.
176176
Environment* env = *test_env;
177177
EXPECT_FALSE(
178-
out->GetPrototypeV2()->StrictEquals(env->buffer_prototype_object()));
178+
out->GetPrototype()->StrictEquals(env->buffer_prototype_object()));
179179
}
180180

181181
TEST_F(IPCSerdesTest, BufferRoundTripsAsBuffer) {
@@ -202,7 +202,7 @@ TEST_F(IPCSerdesTest, BufferRoundTripsAsBuffer) {
202202
// plain Uint8Array.
203203
Environment* env = *test_env;
204204
EXPECT_TRUE(
205-
out->GetPrototypeV2()->StrictEquals(env->buffer_prototype_object()));
205+
out->GetPrototype()->StrictEquals(env->buffer_prototype_object()));
206206
EXPECT_EQ(node::Buffer::Length(out), static_cast<size_t>(6));
207207
EXPECT_EQ(memcmp(node::Buffer::Data(out), "Hello!", 6), 0);
208208
}

0 commit comments

Comments
 (0)