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

Unified Diff: src/json-stringifier.h

Issue 210953005: Clean up some "GetProperty" methods/functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 6 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/isolate.cc ('k') | src/objects.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 3926969f650745a800370e513547e765d1e31280..17c6b6f11141c52a589515f5d706371112411a8d 100644
--- a/src/json-stringifier.h
+++ b/src/json-stringifier.h
@@ -671,7 +671,7 @@ BasicJsonStringifier::Result BasicJsonStringifier::SerializeJSObject(
map->instance_descriptors()->GetFieldIndex(i)),
isolate_);
} else {
- property = GetProperty(isolate_, object, key);
+ property = Object::GetPropertyOrElement(object, key);
RETURN_IF_EMPTY_HANDLE_VALUE(isolate_, property, EXCEPTION);
}
Result result = SerializeProperty(property, comma, key);
@@ -690,7 +690,7 @@ BasicJsonStringifier::Result BasicJsonStringifier::SerializeJSObject(
Handle<Object> property;
if (key->IsString()) {
key_handle = Handle<String>(String::cast(key), isolate_);
- property = GetProperty(isolate_, object, key_handle);
+ property = Object::GetPropertyOrElement(object, key_handle);
} else {
ASSERT(key->IsNumber());
key_handle = factory_->NumberToString(Handle<Object>(key, isolate_));
@@ -701,7 +701,7 @@ BasicJsonStringifier::Result BasicJsonStringifier::SerializeJSObject(
} else if (key_handle->AsArrayIndex(&index)) {
property = Object::GetElement(isolate_, object, index);
} else {
- property = GetProperty(isolate_, object, key_handle);
+ property = Object::GetPropertyOrElement(object, key_handle);
}
}
RETURN_IF_EMPTY_HANDLE_VALUE(isolate_, property, EXCEPTION);
« no previous file with comments | « src/isolate.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698