Reviewers: Dmitry Lomov (chromium),

Message:
The bug turned out to be invalid, but there's a little typo fixup, so I thought
I'd try to get that in. Should be trivial

Description:
Fix typo in harmony-tostring.js, additional test case

BUG=v8:3793
LOG=N
[email protected]

Please review this at https://codereview.chromium.org/835753002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+7, -1 lines):
  M src/harmony-tostring.js
  M test/mjsunit/es6/object-tostring.js


Index: src/harmony-tostring.js
diff --git a/src/harmony-tostring.js b/src/harmony-tostring.js
index 0336456bb2827c13c75bd5f823731a2223e65540..a5d892c8e23af6ce90accaff70320114eae844e9 100644
--- a/src/harmony-tostring.js
+++ b/src/harmony-tostring.js
@@ -33,7 +33,7 @@ function ObjectToStringHarmony() {
   if (IS_UNDEFINED(tag)) {
     tag = builtinTag;
   } else if (!IS_STRING(tag)) {
-    return "[object ???]"
+    return "[object ???]";
   } else if (tag !== builtinTag && kBuiltinStringTags[tag]) {
     return "[object ~" + tag + "]";
   }
Index: test/mjsunit/es6/object-tostring.js
diff --git a/test/mjsunit/es6/object-tostring.js b/test/mjsunit/es6/object-tostring.js index 26dff14b9d29519e24bdc38c6e8d26ae83dc2336..8999a180821cf554e66f4fda4d9e80b74b590775 100644
--- a/test/mjsunit/es6/object-tostring.js
+++ b/test/mjsunit/es6/object-tostring.js
@@ -131,3 +131,9 @@ function testObjectToStringPropertyDesc() {
   assertTrue(desc.configurable);
 }
 testObjectToStringPropertyDesc();
+
+function testObjectToStringOwnNonStringValue() {
+  var obj = Object.defineProperty({}, Symbol.toStringTag, { value: 1 });
+  assertEquals("[object ???]", ({}).toString.call(obj));
+}
+testObjectToStringOwnNonStringValue();


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to