diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-02-20 21:21:56 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-02-20 21:21:56 +0100 |
commit | 0c36b27511c1fbca594f0426c493ef601fda3e4c (patch) | |
tree | 6e801c0abb01391e6008a49f9d6c4ac4dd967cd8 /js/xpconnect | |
parent | d77729916b4b9c2b67abd41181336c2cbb1da968 (diff) | |
download | uxp-0c36b27511c1fbca594f0426c493ef601fda3e4c.tar.gz |
JS - support for Array.prototype.values()
Diffstat (limited to 'js/xpconnect')
-rw-r--r-- | js/xpconnect/src/XPCJSContext.cpp | 5 | ||||
-rw-r--r-- | js/xpconnect/tests/chrome/test_xrayToJS.xul | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.cpp index defd1b7852..bedb7c6500 100644 --- a/js/xpconnect/src/XPCJSContext.cpp +++ b/js/xpconnect/src/XPCJSContext.cpp @@ -1473,6 +1473,8 @@ ReloadPrefsCallback(const char* pref, void* data) sExtraWarningsForSystemJS = Preferences::GetBool(JS_OPTIONS_DOT_STR "strict.debug"); #endif + bool arrayProtoValues = Preferences::GetBool(JS_OPTIONS_DOT_STR "array_prototype_values"); + JS::ContextOptionsRef(cx).setBaseline(useBaseline) .setIon(useIon) .setAsmJS(useAsmJS) @@ -1484,7 +1486,8 @@ ReloadPrefsCallback(const char* pref, void* data) .setThrowOnDebuggeeWouldRun(throwOnDebuggeeWouldRun) .setDumpStackOnDebuggeeWouldRun(dumpStackOnDebuggeeWouldRun) .setWerror(werror) - .setExtraWarnings(extraWarnings); + .setExtraWarnings(extraWarnings) + .setArrayProtoValues(arrayProtoValues); JS_SetParallelParsingEnabled(cx, parallelParsing); JS_SetOffthreadIonCompilationEnabled(cx, offthreadIonCompilation); diff --git a/js/xpconnect/tests/chrome/test_xrayToJS.xul b/js/xpconnect/tests/chrome/test_xrayToJS.xul index 2f4e70f47c..25f882f231 100644 --- a/js/xpconnect/tests/chrome/test_xrayToJS.xul +++ b/js/xpconnect/tests/chrome/test_xrayToJS.xul @@ -198,9 +198,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=933681 "pop", "shift", "unshift", "splice", "concat", "slice", "lastIndexOf", "indexOf", "includes", "forEach", "map", "reduce", "reduceRight", "filter", "some", "every", "find", "findIndex", "copyWithin", "fill", Symbol.iterator, Symbol.unscopables, "entries", "keys", - "constructor"]; + "values", "constructor"]; if (isNightlyBuild) { - gPrototypeProperties['Array'].push("values"); + // ...nothing now } gConstructorProperties['Array'] = constructorProps(["join", "reverse", "sort", "push", "pop", "shift", |