Bug 1582348 - Enable writable streams in the browser when the javascript.options.{,writable_}streams prefs are set. (Writable streams are only half-implemented; DO NOT start reporting bugs yet, it *will* crash in all sorts of trivial ways.) r=jandem

Differential Revision: https://phabricator.services.mozilla.com/D51049

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jeff Walden 2019-11-01 22:55:05 +00:00
parent 130ae0969a
commit 0994b1fc51
2 changed files with 12 additions and 0 deletions

View File

@ -772,6 +772,8 @@ void xpc::SetPrefableRealmOptions(JS::RealmOptions& options) {
options.creationOptions()
.setSharedMemoryAndAtomicsEnabled(sSharedMemoryEnabled)
.setStreamsEnabled(sStreamsEnabled)
.setWritableStreamsEnabled(
StaticPrefs::javascript_options_writable_streams())
.setFieldsEnabled(sFieldsEnabled)
.setAwaitFixEnabled(sAwaitFixEnabled);
}

View File

@ -4016,6 +4016,16 @@
value: true
mirror: always
# Writable Streams API. (The pref above must also be set to expose this.)
#
# Writable streams are still EXTRAORDINARILY BETA and it is well-known that
# things are likely pretty broken if you poke much at all, so if you flip this
# preference, don't report bugs against it just yet.
- name: javascript.options.writable_streams
type: RelaxedAtomicBool
value: false
mirror: always
- name: javascript.options.main_thread_stack_quota_cap
type: uint32_t
#if defined(MOZ_ASAN)