зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1652744 - Add browser pref for private fields support r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D83511
This commit is contained in:
Родитель
f8473cc09a
Коммит
b56bdc1e4b
|
@ -33,3 +33,4 @@ user_pref("browser.webapps.checkForUpdates", 0);
|
|||
user_pref("javascript.options.weakrefs", true);
|
||||
user_pref("javascript.options.experimental.weakrefs.expose_cleanupSome", true);
|
||||
user_pref("javascript.options.experimental.iterator_helpers", true);
|
||||
user_pref("javascript.options.experimental.private_fields", true);
|
|
@ -760,6 +760,7 @@ static mozilla::Atomic<bool> sPropertyErrorMessageFixEnabled(false);
|
|||
static mozilla::Atomic<bool> sWeakRefsEnabled(false);
|
||||
static mozilla::Atomic<bool> sWeakRefsExposeCleanupSome(false);
|
||||
static mozilla::Atomic<bool> sIteratorHelpersEnabled(false);
|
||||
static mozilla::Atomic<bool> sPrivateFieldsEnabled(false);
|
||||
|
||||
static JS::WeakRefSpecifier GetWeakRefsEnabled() {
|
||||
if (!sWeakRefsEnabled) {
|
||||
|
@ -784,7 +785,8 @@ void xpc::SetPrefableRealmOptions(JS::RealmOptions& options) {
|
|||
StaticPrefs::javascript_options_writable_streams())
|
||||
.setPropertyErrorMessageFixEnabled(sPropertyErrorMessageFixEnabled)
|
||||
.setWeakRefsEnabled(GetWeakRefsEnabled())
|
||||
.setIteratorHelpersEnabled(sIteratorHelpersEnabled);
|
||||
.setIteratorHelpersEnabled(sIteratorHelpersEnabled)
|
||||
.setPrivateClassFieldsEnabled(sPrivateFieldsEnabled);
|
||||
}
|
||||
|
||||
static void LoadStartupJSPrefs(XPCJSContext* xpccx) {
|
||||
|
@ -967,6 +969,8 @@ static void ReloadPrefsCallback(const char* pref, void* aXpccx) {
|
|||
#ifdef NIGHTLY_BUILD
|
||||
sIteratorHelpersEnabled =
|
||||
Preferences::GetBool(JS_OPTIONS_DOT_STR "experimental.iterator_helpers");
|
||||
sPrivateFieldsEnabled =
|
||||
Preferences::GetBool(JS_OPTIONS_DOT_STR "experimental.private_fields");
|
||||
#endif
|
||||
|
||||
#ifdef JS_GC_ZEAL
|
||||
|
|
|
@ -4909,6 +4909,12 @@
|
|||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
# Experimental support for Private Fields in JavaScript.
|
||||
- name: javascript.options.experimental.private_fields
|
||||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
mirror: always
|
||||
#endif
|
||||
|
||||
# The amount of time we wait between a request to GC (due to leaving a page) and doing the actual GC, in ms.
|
||||
|
|
Загрузка…
Ссылка в новой задаче