Changeset 272099 in webkit


Ignore:
Timestamp:
Jan 29, 2021 8:57:02 PM (18 months ago)
Author:
ysuzuki@apple.com
Message:

[JSC] Adjust property order of host JSFunction
https://bugs.webkit.org/show_bug.cgi?id=221168

Reviewed by Darin Adler.

JSTests:

  • stress/host-function-property-order.js: Added.

(shouldBe):

Source/JavaScriptCore:

We should first define "length" before "name".
This will be included in upcoming test262 update[1].

[1]: https://github.com/tc39/test262/pull/2921

  • runtime/JSFunction.cpp:

(JSC::JSFunction::finishCreation):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r272081 r272099  
     12021-01-29  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] Adjust property order of host JSFunction
     4        https://bugs.webkit.org/show_bug.cgi?id=221168
     5
     6        Reviewed by Darin Adler.
     7
     8        * stress/host-function-property-order.js: Added.
     9        (shouldBe):
     10
    1112021-01-29  Yusuke Suzuki  <ysuzuki@apple.com>
    212
  • trunk/Source/JavaScriptCore/ChangeLog

    r272086 r272099  
     12021-01-29  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] Adjust property order of host JSFunction
     4        https://bugs.webkit.org/show_bug.cgi?id=221168
     5
     6        Reviewed by Darin Adler.
     7
     8        We should first define "length" before "name".
     9        This will be included in upcoming test262 update[1].
     10
     11        [1]: https://github.com/tc39/test262/pull/2921
     12
     13        * runtime/JSFunction.cpp:
     14        (JSC::JSFunction::finishCreation):
     15
    1162021-01-29  Keith Miller  <keith_miller@apple.com>
    217
  • trunk/Source/JavaScriptCore/runtime/JSFunction.cpp

    r271269 r272099  
    130130    ASSERT(!this->inherits<JSBoundFunction>(vm));
    131131
     132    putDirect(vm, vm.propertyNames->length, jsNumber(length), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    132133    if (!name.isNull())
    133134        putDirect(vm, vm.propertyNames->name, jsString(vm, name), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    134     putDirect(vm, vm.propertyNames->length, jsNumber(length), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    135135}
    136136
Note: See TracChangeset for help on using the changeset viewer.