Commit fdf0a3a7 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by V8 LUCI CQ

Only enumerate own properties in value-mirror.cc

We previously enumberated properties and then restricted them
to real named properties. This CL changes it to only enumerate
own properties in the first place.

Bug: chromium:1213393
Change-Id: I8665a19a9beccae3bef99106924b65fb219d48ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953284Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75094}
parent d5036361
...@@ -50,7 +50,7 @@ Response objectToProtocolValue( ...@@ -50,7 +50,7 @@ Response objectToProtocolValue(
std::unique_ptr<protocol::DictionaryValue> jsonObject = std::unique_ptr<protocol::DictionaryValue> jsonObject =
protocol::DictionaryValue::create(); protocol::DictionaryValue::create();
v8::Local<v8::Array> propertyNames; v8::Local<v8::Array> propertyNames;
if (!object->GetPropertyNames(context).ToLocal(&propertyNames)) if (!object->GetOwnPropertyNames(context).ToLocal(&propertyNames))
return Response::InternalError(); return Response::InternalError();
uint32_t length = propertyNames->Length(); uint32_t length = propertyNames->Length();
for (uint32_t i = 0; i < length; i++) { for (uint32_t i = 0; i < length; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment