Bug 1783703 - Part 2: Change-Array-By-Copy flag should be a RealmCreationOptions. r=mgaudet

Built-ins are created when the realm is created (at least according to the spec),
so it should be a RealmCreationOptions.

Differential Revision: https://phabricator.services.mozilla.com/D153983
This commit is contained in:
André Bargull
2022-08-09 09:50:29 +00:00
parent e9cf14a263
commit 4b0f41f774
8 changed files with 36 additions and 27 deletions

View File

@@ -3864,6 +3864,9 @@ static void SetStandardRealmOptions(JS::RealmOptions& options) {
#ifdef NIGHTLY_BUILD
.setArrayGroupingEnabled(enableArrayGrouping)
#endif
#ifdef ENABLE_CHANGE_ARRAY_BY_COPY
.setChangeArrayByCopyEnabled(enableChangeArrayByCopy)
#endif
#ifdef ENABLE_NEW_SET_METHODS
.setNewSetMethodsEnabled(enableNewSetMethods)
#endif
@@ -10753,9 +10756,6 @@ static bool SetContextOptions(JSContext* cx, const OptionParser& op) {
.setSourcePragmas(enableSourcePragmas)
.setAsyncStack(enableAsyncStacks)
.setAsyncStackCaptureDebuggeeOnly(enableAsyncStackCaptureDebuggeeOnly)
#ifdef ENABLE_CHANGE_ARRAY_BY_COPY
.setChangeArrayByCopy(enableChangeArrayByCopy)
#endif
.setImportAssertions(enableImportAssertions);
JS::SetUseFdlibmForSinCosTan(useFdlibmForSinCosTan);