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

Unified Diff: src/json-stringifier.h

Issue 1178893002: Introduce LookupIterator::PropertyOrElement which converts name to index if possible. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/api-natives.cc ('k') | src/lookup.h » ('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 a28691503d12c7799ff3df9f0c99f130b211dd6b..482d7920d3dcce0007e29c8b6bec970fe37fb248 100644
--- a/src/json-stringifier.h
+++ b/src/json-stringifier.h
@@ -580,12 +580,9 @@ BasicJsonStringifier::Result BasicJsonStringifier::SerializeJSObject(
} else {
DCHECK(key->IsNumber());
key_handle = factory()->NumberToString(Handle<Object>(key, isolate_));
- uint32_t index;
if (key->IsSmi()) {
maybe_property = Object::GetElement(
isolate_, object, Smi::cast(key)->value());
- } else if (key_handle->AsArrayIndex(&index)) {
- maybe_property = Object::GetElement(isolate_, object, index);
} else {
maybe_property = Object::GetPropertyOrElement(object, key_handle);
}
« no previous file with comments | « src/api-natives.cc ('k') | src/lookup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698