Issue #1442 - Part 2: Add a run-time preference for toggling the streams API. https://bugzilla.mozilla.org/show_bug.cgi?id=1272697

This commit is contained in:
Brian Smith 2023-09-27 10:45:00 -05:00 committed by roytam1
commit 62467428a3
5 changed files with 26 additions and 3 deletions

View file

@ -1161,6 +1161,16 @@ class JS_PUBLIC_API(ContextOptions) {
return *this;
}
bool streams() const { return streams_; }
ContextOptions& setStreams(bool flag) {
streams_ = flag;
return *this;
}
ContextOptions& toggleStreams() {
streams_ = !streams_;
return *this;
}
bool nativeRegExp() const { return nativeRegExp_; }
ContextOptions& setNativeRegExp(bool flag) {
nativeRegExp_ = flag;
@ -1243,6 +1253,7 @@ class JS_PUBLIC_API(ContextOptions) {
bool strictMode_ : 1;
bool extraWarnings_ : 1;
bool arrayProtoValues_ : 1;
bool streams_ : 1;
};
JS_PUBLIC_API(ContextOptions&)