Skip to content

Commit 7e7ff40

Browse files
joyeecheungnodejs-github-bot
authored andcommitted
src,test: migrate GetPrototypeV2() to GetPrototype()
Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com> PR-URL: #66537 Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 18b117b commit 7e7ff40

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)