Title: [265034] trunk
Revision
265034
Author
ysuz...@apple.com
Date
2020-07-29 01:32:59 -0700 (Wed, 29 Jul 2020)

Log Message

[JSC] Reflect object should have toStringTag with "Reflect"
https://bugs.webkit.org/show_bug.cgi?id=214909

Reviewed by Mark Lam.

JSTests:

* stress/reflect.js:
* test262/expectations.yaml:

Source/_javascript_Core:

We call JSC_TO_STRING_TAG_WITHOUT_TRANSITION in ReflectObject to set "Reflect" @@toStringTag, which fixes one test262 failure.

* runtime/ReflectObject.cpp:
(JSC::ReflectObject::finishCreation):

Modified Paths

Diff

Modified: trunk/JSTests/ChangeLog (265033 => 265034)


--- trunk/JSTests/ChangeLog	2020-07-29 08:16:22 UTC (rev 265033)
+++ trunk/JSTests/ChangeLog	2020-07-29 08:32:59 UTC (rev 265034)
@@ -1,3 +1,13 @@
+2020-07-29  Yusuke Suzuki  <ysuz...@apple.com>
+
+        [JSC] Reflect object should have toStringTag with "Reflect"
+        https://bugs.webkit.org/show_bug.cgi?id=214909
+
+        Reviewed by Mark Lam.
+
+        * stress/reflect.js:
+        * test262/expectations.yaml:
+
 2020-07-28  Caitlin Potter  <ca...@igalia.com>
 
         [JSC] add IC support for op_get_private_name

Modified: trunk/JSTests/stress/reflect.js (265033 => 265034)


--- trunk/JSTests/stress/reflect.js	2020-07-29 08:16:22 UTC (rev 265033)
+++ trunk/JSTests/stress/reflect.js	2020-07-29 08:32:59 UTC (rev 265034)
@@ -6,5 +6,5 @@
 shouldBe(typeof Reflect, "object");
 shouldBe(Reflect, Reflect);
 shouldBe(Object.getPrototypeOf(Reflect), Object.getPrototypeOf({}));
-shouldBe(Reflect.toString(), "[object Object]");
+shouldBe(Reflect.toString(), "[object Reflect]");
 shouldBe(Reflect.hasOwnProperty, Object.prototype.hasOwnProperty);

Modified: trunk/JSTests/test262/expectations.yaml (265033 => 265034)


--- trunk/JSTests/test262/expectations.yaml	2020-07-29 08:16:22 UTC (rev 265033)
+++ trunk/JSTests/test262/expectations.yaml	2020-07-29 08:32:59 UTC (rev 265034)
@@ -985,9 +985,6 @@
 test/built-ins/Proxy/ownKeys/trap-is-undefined-target-is-proxy.js:
   default: 'Test262Error: Expected [length, foo, 0, Symbol()] and [Symbol(), length, foo, 0] to have the same contents. '
   strict mode: 'Test262Error: Expected [length, foo, 0, Symbol()] and [Symbol(), length, foo, 0] to have the same contents. '
-test/built-ins/Reflect/Symbol.toStringTag.js:
-  default: 'Test262Error: obj should have an own property Symbol(Symbol.toStringTag)'
-  strict mode: 'Test262Error: obj should have an own property Symbol(Symbol.toStringTag)'
 test/built-ins/RegExp/property-escapes/generated/Alphabetic.js:
   default: 'Test262Error: `\p{Alphabetic}` should match U+001CFA (`ᳺ`)'
   strict mode: 'Test262Error: `\p{Alphabetic}` should match U+001CFA (`ᳺ`)'

Modified: trunk/Source/_javascript_Core/ChangeLog (265033 => 265034)


--- trunk/Source/_javascript_Core/ChangeLog	2020-07-29 08:16:22 UTC (rev 265033)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-07-29 08:32:59 UTC (rev 265034)
@@ -1,3 +1,15 @@
+2020-07-29  Yusuke Suzuki  <ysuz...@apple.com>
+
+        [JSC] Reflect object should have toStringTag with "Reflect"
+        https://bugs.webkit.org/show_bug.cgi?id=214909
+
+        Reviewed by Mark Lam.
+
+        We call JSC_TO_STRING_TAG_WITHOUT_TRANSITION in ReflectObject to set "Reflect" @@toStringTag, which fixes one test262 failure.
+
+        * runtime/ReflectObject.cpp:
+        (JSC::ReflectObject::finishCreation):
+
 2020-07-28  Yusuke Suzuki  <ysuz...@apple.com>
 
         [JSC] Add hasCustomGetterSetterProperties to canAccessPropertiesQuicklyForEnumeration

Modified: trunk/Source/_javascript_Core/runtime/ReflectObject.cpp (265033 => 265034)


--- trunk/Source/_javascript_Core/runtime/ReflectObject.cpp	2020-07-29 08:16:22 UTC (rev 265033)
+++ trunk/Source/_javascript_Core/runtime/ReflectObject.cpp	2020-07-29 08:32:59 UTC (rev 265034)
@@ -50,7 +50,7 @@
 
 STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(ReflectObject);
 
-const ClassInfo ReflectObject::s_info = { "Object", &Base::s_info, &reflectObjectTable, nullptr, CREATE_METHOD_TABLE(ReflectObject) };
+const ClassInfo ReflectObject::s_info = { "Reflect", &Base::s_info, &reflectObjectTable, nullptr, CREATE_METHOD_TABLE(ReflectObject) };
 
 /* Source for ReflectObject.lut.h
 @begin reflectObjectTable
@@ -79,6 +79,7 @@
 {
     Base::finishCreation(vm);
     ASSERT(inherits(vm, info()));
+    JSC_TO_STRING_TAG_WITHOUT_TRANSITION();
 }
 
 // ------------------------------ Functions --------------------------------
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to