Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: src/json-stringifier.h

Issue 1775973002: Add GetProperty/GetElement to JSReceiver and use it where possible (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ic/ic.cc ('k') | src/log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json-stringifier.h
diff --git a/src/json-stringifier.h b/src/json-stringifier.h
index d97ca2ba7374ec0b043bb36200702d3c32033d23..44e710375d43879a7f1b4dc10edc4d510343f532 100644
--- a/src/json-stringifier.h
+++ b/src/json-stringifier.h
@@ -501,8 +501,7 @@ BasicJsonStringifier::Result BasicJsonStringifier::SerializeJSArraySlow(
if (i > 0) builder_.AppendCharacter(',');
Handle<Object> element;
ASSIGN_RETURN_ON_EXCEPTION_VALUE(
- isolate_, element,
- Object::GetElement(isolate_, object, i),
+ isolate_, element, JSReceiver::GetElement(isolate_, object, i),
EXCEPTION);
if (element->IsUndefined()) {
builder_.AppendCString("null");
@@ -580,8 +579,8 @@ BasicJsonStringifier::Result BasicJsonStringifier::SerializeJSObject(
DCHECK(key->IsNumber());
key_handle = factory()->NumberToString(Handle<Object>(key, isolate_));
if (key->IsSmi()) {
- maybe_property = Object::GetElement(
- isolate_, object, Smi::cast(key)->value());
+ maybe_property =
+ JSReceiver::GetElement(isolate_, object, Smi::cast(key)->value());
} else {
maybe_property = Object::GetPropertyOrElement(object, key_handle);
}
« no previous file with comments | « src/ic/ic.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698