Bug 1041631, part 2 - Make ES6 Symbols Nightly-only for now. r=Waldo.

--HG--
extra : rebase_source : f2365f340299edac9db040280a2a13aa254e5148
This commit is contained in:
Jason Orendorff 2014-08-21 16:34:00 -05:00
Родитель 0d73ef9d91
Коммит 63d1614798
3 изменённых файлов: 15 добавлений и 1 удалений

Просмотреть файл

@ -4,6 +4,8 @@
#include "jsapi-tests/tests.h" #include "jsapi-tests/tests.h"
#ifdef JS_HAS_SYMBOLS
BEGIN_TEST(testSymbol_New) BEGIN_TEST(testSymbol_New)
{ {
using namespace JS; using namespace JS;
@ -80,3 +82,4 @@ BEGIN_TEST(testSymbol_GetWellKnownSymbol)
} }
END_TEST(testSymbol_GetWellKnownSymbol) END_TEST(testSymbol_GetWellKnownSymbol)
#endif

Просмотреть файл

@ -60,6 +60,12 @@
#define IF_SAB(real,imaginary) imaginary #define IF_SAB(real,imaginary) imaginary
#endif #endif
#ifdef JS_HAS_SYMBOLS
#define IF_SYMBOLS(real,imaginary) real
#else
#define IF_SYMBOLS(real,imaginary) imaginary
#endif
#define JS_FOR_PROTOTYPES(real,imaginary) \ #define JS_FOR_PROTOTYPES(real,imaginary) \
imaginary(Null, 0, js_InitNullClass, dummy) \ imaginary(Null, 0, js_InitNullClass, dummy) \
real(Object, 1, js_InitViaClassSpec, &JSObject::class_) \ real(Object, 1, js_InitViaClassSpec, &JSObject::class_) \
@ -97,7 +103,7 @@
real(Map, 33, js_InitMapClass, OCLASP(Map)) \ real(Map, 33, js_InitMapClass, OCLASP(Map)) \
real(Set, 34, js_InitSetClass, OCLASP(Set)) \ real(Set, 34, js_InitSetClass, OCLASP(Set)) \
real(DataView, 35, js_InitDataViewClass, OCLASP(DataView)) \ real(DataView, 35, js_InitDataViewClass, OCLASP(DataView)) \
real(Symbol, 36, js_InitSymbolClass, &js::SymbolObject::class_) \ IF_SYMBOLS(real,imaginary)(Symbol, 36, js_InitSymbolClass, &js::SymbolObject::class_) \
IF_SAB(real,imaginary)(SharedArrayBuffer, 37, js_InitSharedArrayBufferClass, &js::SharedArrayBufferObject::protoClass) \ IF_SAB(real,imaginary)(SharedArrayBuffer, 37, js_InitSharedArrayBufferClass, &js::SharedArrayBufferObject::protoClass) \
IF_INTL(real,imaginary) (Intl, 38, js_InitIntlClass, CLASP(Intl)) \ IF_INTL(real,imaginary) (Intl, 38, js_InitIntlClass, CLASP(Intl)) \
IF_BDATA(real,imaginary)(TypedObject, 39, js_InitTypedObjectModuleObject, OCLASP(TypedObjectModule)) \ IF_BDATA(real,imaginary)(TypedObject, 39, js_InitTypedObjectModuleObject, OCLASP(TypedObjectModule)) \

Просмотреть файл

@ -41,4 +41,9 @@
*/ */
#define JS_OLD_GETTER_SETTER_METHODS 1 #define JS_OLD_GETTER_SETTER_METHODS 1
/* Support for Symbols - Nightly-only for now. */
#ifdef NIGHTLY_BUILD
#define JS_HAS_SYMBOLS 1
#endif
#endif /* jsversion_h */ #endif /* jsversion_h */