Ignore:
Timestamp:
Aug 4, 2016, 7:50:19 PM (9 years ago)
Author:
Yusuke Suzuki
Message:

[ES6] JSModuleNamespaceObject's Symbol.iterator function should have name
https://bugs.webkit.org/show_bug.cgi?id=160549

Reviewed by Saam Barati.

JSTests:

  • modules/namespace-object-symbol-iterator-name.js: Added.
  • test262.yaml:

Source/JavaScriptCore:

ES6 Module's namespace[Symbol.iterator] function should have the name, "[Symbol.iterator]".

  • runtime/JSModuleNamespaceObject.cpp:

(JSC::JSModuleNamespaceObject::finishCreation):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp

    r201703 r204160  
    7373
    7474    m_moduleRecord.set(vm, this, moduleRecord);
    75     JSC_NATIVE_FUNCTION(vm.propertyNames->iteratorSymbol, moduleNamespaceObjectSymbolIterator, DontEnum, 0);
     75    JSFunction* iteratorFunction = JSFunction::create(vm, globalObject, 0, ASCIILiteral("[Symbol.iterator]"), moduleNamespaceObjectSymbolIterator, NoIntrinsic);
     76    putDirect(vm, vm.propertyNames->iteratorSymbol, iteratorFunction, DontEnum);
    7677    putDirect(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Module"), DontEnum | ReadOnly);
    7778
Note: See TracChangeset for help on using the changeset viewer.