Ignore:
Timestamp:
Jan 22, 2016, 10:44:46 AM (9 years ago)
Author:
[email protected]
Message:

[ES6] Add Symbol.species properties to the relevant constructors
https://bugs.webkit.org/show_bug.cgi?id=153339

Reviewed by Michael Saboff.

Source/JavaScriptCore:

This patch adds Symbol.species to the RegExp, Array, TypedArray, Map, Set, ArrayBuffer, and
Promise constructors. The functions that use these properties will be added in a later
patch.

  • builtins/GlobalObject.js:

(speciesGetter):

  • runtime/ArrayConstructor.cpp:

(JSC::ArrayConstructor::finishCreation):

  • runtime/ArrayConstructor.h:

(JSC::ArrayConstructor::create):

  • runtime/BooleanConstructor.h:

(JSC::BooleanConstructor::create):

  • runtime/CommonIdentifiers.h:
  • runtime/DateConstructor.h:

(JSC::DateConstructor::create):

  • runtime/ErrorConstructor.h:

(JSC::ErrorConstructor::create):

  • runtime/JSArrayBufferConstructor.cpp:

(JSC::JSArrayBufferConstructor::finishCreation):
(JSC::JSArrayBufferConstructor::create):

  • runtime/JSArrayBufferConstructor.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSInternalPromiseConstructor.cpp:

(JSC::JSInternalPromiseConstructor::create):

  • runtime/JSInternalPromiseConstructor.h:
  • runtime/JSPromiseConstructor.cpp:

(JSC::JSPromiseConstructor::create):
(JSC::JSPromiseConstructor::finishCreation):

  • runtime/JSPromiseConstructor.h:
  • runtime/JSTypedArrayViewConstructor.cpp:

(JSC::JSTypedArrayViewConstructor::finishCreation):
(JSC::JSTypedArrayViewConstructor::create): Deleted.

  • runtime/JSTypedArrayViewConstructor.h:

(JSC::JSTypedArrayViewConstructor::create):

  • runtime/MapConstructor.cpp:

(JSC::MapConstructor::finishCreation):

  • runtime/MapConstructor.h:

(JSC::MapConstructor::create):

  • runtime/NumberConstructor.h:

(JSC::NumberConstructor::create):

  • runtime/RegExpConstructor.cpp:

(JSC::RegExpConstructor::finishCreation):

  • runtime/RegExpConstructor.h:

(JSC::RegExpConstructor::create):

  • runtime/SetConstructor.cpp:

(JSC::SetConstructor::finishCreation):

  • runtime/SetConstructor.h:

(JSC::SetConstructor::create):

  • runtime/StringConstructor.h:

(JSC::StringConstructor::create):

  • runtime/SymbolConstructor.h:

(JSC::SymbolConstructor::create):

  • runtime/WeakMapConstructor.h:

(JSC::WeakMapConstructor::create):

  • runtime/WeakSetConstructor.h:

(JSC::WeakSetConstructor::create):

  • tests/stress/symbol-species.js: Added.

(testSymbolSpeciesOnConstructor):

LayoutTests:

Add species to the list of property names on the Symbol object.

  • js/Object-getOwnPropertyNames-expected.txt:
  • js/script-tests/Object-getOwnPropertyNames.js:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/builtins/GlobalObject.js

    r192464 r195460  
    6565    return typeof object === "undefined" || object == null || typeof object === "object";
    6666}
     67
     68// FIXME: this needs to have it's name changed to "get [Symbol.species]".
     69// see: https://bugs.webkit.org/show_bug.cgi?id=151363
     70function speciesGetter()
     71{
     72    return this;
     73}
Note: See TracChangeset for help on using the changeset viewer.