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

Unified Diff: src/objects.cc

Issue 13552002: ES6 symbols: fix corner cases of equality operators (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « no previous file | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 9d6c055c1b33c908c582e1ce193d1e52e2c63803..9fada426d8a63cd04cc0b7688c3f04b9158b7501 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -98,6 +98,10 @@ MaybeObject* Object::ToObject() {
Isolate* isolate = HeapObject::cast(this)->GetIsolate();
Context* native_context = isolate->context()->native_context();
return CreateJSValue(native_context->string_function(), this);
+ } else if (IsSymbol()) {
+ Isolate* isolate = HeapObject::cast(this)->GetIsolate();
+ Context* native_context = isolate->context()->native_context();
+ return CreateJSValue(native_context->symbol_function(), this);
}
// Throw a type error.
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698