⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 202956 in webkit


Ignore:
Timestamp:
Jul 7, 2016, 9:10:00 PM (10 years ago)
Author:
benjamin@webkit.org
Message:

[JSC] String.prototype[Symbol.iterator] needs a name
https://bugs.webkit.org/show_bug.cgi?id=159541

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

A man needs a name.
Spec: https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator

  • runtime/StringPrototype.cpp:

(JSC::StringPrototype::finishCreation):

LayoutTests:

  • js/script-tests/string-iterator.js: Added.
  • js/string-iterator-expected.txt: Added.
  • js/string-iterator.html: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r202954 r202956  
     12016-07-07  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        [JSC] String.prototype[Symbol.iterator] needs a name
     4        https://bugs.webkit.org/show_bug.cgi?id=159541
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        * js/script-tests/string-iterator.js: Added.
     9        * js/string-iterator-expected.txt: Added.
     10        * js/string-iterator.html: Added.
     11
    1122016-07-07  Joseph Pecoraro  <pecoraro@apple.com>
    213
  • trunk/Source/JavaScriptCore/ChangeLog

    r202955 r202956  
     12016-07-07  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        [JSC] String.prototype[Symbol.iterator] needs a name
     4        https://bugs.webkit.org/show_bug.cgi?id=159541
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        A man needs a name.
     9        Spec: https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
     10
     11        * runtime/StringPrototype.cpp:
     12        (JSC::StringPrototype::finishCreation):
     13
    1142016-07-07  Michael Saboff  <msaboff@apple.com>
    215
  • trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp

    r202954 r202956  
    175175    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("includes", stringProtoFuncIncludes, DontEnum, 1);
    176176    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("normalize", stringProtoFuncNormalize, DontEnum, 0);
    177     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->iteratorSymbol, stringProtoFuncIterator, DontEnum, 0);
    178 
    179177    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().charCodeAtPrivateName(), stringProtoFuncCharCodeAt, DontEnum, 1, CharCodeAtIntrinsic);
     178
     179    JSFunction* iteratorFunction = JSFunction::create(vm, globalObject, 0, ASCIILiteral("[Symbol.iterator]"), stringProtoFuncIterator, NoIntrinsic);
     180    putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, iteratorFunction, DontEnum);
    180181
    181182    // The constructor will be added later, after StringConstructor has been built
Note: See TracChangeset for help on using the changeset viewer.