Skip to content

Commit

Permalink
src: switch from GetPrototype to GetPrototypeV2
Browse files Browse the repository at this point in the history
  • Loading branch information
avivkeller committed Oct 18, 2024
1 parent 7ae193d commit 3c386ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/internal_only_v8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class PrototypeChainHas : public v8::QueryObjectPredicate {
if (creation_context != context_) {
return false;
}
for (Local<Value> proto = object->GetPrototype(); proto->IsObject();
proto = proto.As<Object>()->GetPrototype()) {
for (Local<Value> proto = object->GetPrototypeV2(); proto->IsObject();
proto = proto.As<Object>()->GetPrototypeV2()) {
if (search_ == proto) return true;
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/js_native_api_v8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ napi_status NAPI_CDECL napi_get_prototype(napi_env env,
CHECK_TO_OBJECT(env, context, obj, object);

// This doesn't invokes Proxy's [[GetPrototypeOf]] handler.
v8::Local<v8::Value> val = obj->GetPrototype();
v8::Local<v8::Value> val = obj->GetPrototypeV2();
*result = v8impl::JsValueFromV8LocalValue(val);
return GET_RETURN_STATUS(env);
}
Expand Down
2 changes: 1 addition & 1 deletion src/node_webstorage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ template <typename T>
static bool ShouldIntercept(Local<Name> property,
const PropertyCallbackInfo<T>& info) {
Environment* env = Environment::GetCurrent(info);
Local<Value> proto = info.This()->GetPrototype();
Local<Value> proto = info.This()->GetPrototypeV2();

if (proto->IsObject()) {
bool has_prop;
Expand Down

0 comments on commit 3c386ed

Please sign in to comment.