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

Unified Diff: src/json-stringifier.h

Issue 12330012: ES6 symbols: Allow symbols as property names (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Platform ports Created 7 years, 10 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/ia32/stub-cache-ia32.cc ('k') | src/log.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 b683a46db2667eba0d6a077c06b629a49310cca6..669de069371d4b0d2a92ea32373f14c7c103e811 100644
--- a/src/json-stringifier.h
+++ b/src/json-stringifier.h
@@ -540,7 +540,10 @@ BasicJsonStringifier::Result BasicJsonStringifier::SerializeJSObject(
object->elements()->length() == 0) {
Handle<Map> map(object->map());
for (int i = 0; i < map->NumberOfOwnDescriptors(); i++) {
- Handle<String> key(map->instance_descriptors()->GetKey(i), isolate_);
+ Handle<Name> name(map->instance_descriptors()->GetKey(i), isolate_);
+ // TODO(rossberg): Should this throw?
+ if (!name->IsString()) continue;
+ Handle<String> key = Handle<String>::cast(name);
PropertyDetails details = map->instance_descriptors()->GetDetails(i);
if (details.IsDontEnum() || details.IsDeleted()) continue;
Handle<Object> property;
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698