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

Unified Diff: src/v8natives.js

Issue 12957004: ES6 symbols: turn symbols into a proper primitive type (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
« src/symbol.js ('K') | « src/v8globals.h ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 24ad22d96d1d530121452d1d83cb7bf21dff8344..a382350f242c3c4375bbf82f3f8ee4d47115219c 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -233,7 +233,6 @@ $Object.prototype.constructor = $Object;
function ObjectToString() {
if (IS_UNDEFINED(this) && !IS_UNDETECTABLE(this)) return "[object Undefined]";
if (IS_NULL(this)) return "[object Null]";
- if (IS_SYMBOL(this)) return "[object Symbol]";
return "[object " + %_ClassOf(ToObject(this)) + "]";
}
@@ -865,7 +864,7 @@ function DefineArrayProperty(obj, p, desc, should_throw) {
// DefineObjectProperty() to modify its value.
// Step 3 - Special handling for length property.
- if (p == "length") {
+ if (!IS_SYMBOL(p) && p == "length") {
var length = obj.length;
if (!desc.hasValue()) {
return DefineObjectProperty(obj, "length", desc, should_throw);
« src/symbol.js ('K') | « src/v8globals.h ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698