Changeset 265034 in webkit


Ignore:
Timestamp:
Jul 29, 2020 1:32:59 AM (4 years ago)
Author:
ysuzuki@apple.com
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/JavaScriptCore:

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):

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r265000 r265034  
     12020-07-29  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] Reflect object should have toStringTag with "Reflect"
     4        https://bugs.webkit.org/show_bug.cgi?id=214909
     5
     6        Reviewed by Mark Lam.
     7
     8        * stress/reflect.js:
     9        * test262/expectations.yaml:
     10
    1112020-07-28  Caitlin Potter  <caitp@igalia.com>
    212
  • trunk/JSTests/stress/reflect.js

    r264397 r265034  
    77shouldBe(Reflect, Reflect);
    88shouldBe(Object.getPrototypeOf(Reflect), Object.getPrototypeOf({}));
    9 shouldBe(Reflect.toString(), "[object Object]");
     9shouldBe(Reflect.toString(), "[object Reflect]");
    1010shouldBe(Reflect.hasOwnProperty, Object.prototype.hasOwnProperty);
  • trunk/JSTests/test262/expectations.yaml

    r264894 r265034  
    986986  default: 'Test262Error: Expected [length, foo, 0, Symbol()] and [Symbol(), length, foo, 0] to have the same contents. '
    987987  strict mode: 'Test262Error: Expected [length, foo, 0, Symbol()] and [Symbol(), length, foo, 0] to have the same contents. '
    988 test/built-ins/Reflect/Symbol.toStringTag.js:
    989   default: 'Test262Error: obj should have an own property Symbol(Symbol.toStringTag)'
    990   strict mode: 'Test262Error: obj should have an own property Symbol(Symbol.toStringTag)'
    991988test/built-ins/RegExp/property-escapes/generated/Alphabetic.js:
    992989  default: 'Test262Error: `\p{Alphabetic}` should match U+001CFA (`ᳺ`)'
  • trunk/Source/JavaScriptCore/ChangeLog

    r265030 r265034  
     12020-07-29  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] Reflect object should have toStringTag with "Reflect"
     4        https://bugs.webkit.org/show_bug.cgi?id=214909
     5
     6        Reviewed by Mark Lam.
     7
     8        We call JSC_TO_STRING_TAG_WITHOUT_TRANSITION in ReflectObject to set "Reflect" @@toStringTag, which fixes one test262 failure.
     9
     10        * runtime/ReflectObject.cpp:
     11        (JSC::ReflectObject::finishCreation):
     12
    1132020-07-28  Yusuke Suzuki  <ysuzuki@apple.com>
    214
  • trunk/Source/JavaScriptCore/runtime/ReflectObject.cpp

    r261895 r265034  
    5151STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(ReflectObject);
    5252
    53 const ClassInfo ReflectObject::s_info = { "Object", &Base::s_info, &reflectObjectTable, nullptr, CREATE_METHOD_TABLE(ReflectObject) };
     53const ClassInfo ReflectObject::s_info = { "Reflect", &Base::s_info, &reflectObjectTable, nullptr, CREATE_METHOD_TABLE(ReflectObject) };
    5454
    5555/* Source for ReflectObject.lut.h
     
    8080    Base::finishCreation(vm);
    8181    ASSERT(inherits(vm, info()));
     82    JSC_TO_STRING_TAG_WITHOUT_TRANSITION();
    8283}
    8384
Note: See TracChangeset for help on using the changeset viewer.