From 0c36b27511c1fbca594f0426c493ef601fda3e4c Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Tue, 20 Feb 2018 21:21:56 +0100 Subject: JS - support for Array.prototype.values() --- js/src/jsapi.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'js/src/jsapi.h') diff --git a/js/src/jsapi.h b/js/src/jsapi.h index 2d6ff462c..154c88f45 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -1102,7 +1102,8 @@ class JS_PUBLIC_API(ContextOptions) { dumpStackOnDebuggeeWouldRun_(false), werror_(false), strictMode_(false), - extraWarnings_(false) + extraWarnings_(false), + arrayProtoValues_(true) { } @@ -1226,6 +1227,12 @@ class JS_PUBLIC_API(ContextOptions) { return *this; } + bool arrayProtoValues() const { return arrayProtoValues_; } + ContextOptions& setArrayProtoValues(bool flag) { + arrayProtoValues_ = flag; + return *this; + } + private: bool baseline_ : 1; bool ion_ : 1; @@ -1241,6 +1248,7 @@ class JS_PUBLIC_API(ContextOptions) { bool werror_ : 1; bool strictMode_ : 1; bool extraWarnings_ : 1; + bool arrayProtoValues_ : 1; }; JS_PUBLIC_API(ContextOptions&) -- cgit v1.2.3