Bug 1217238 - Propagate changes of javascript.options.reduce_time_precision to workers. r=bz draft
authorJonathan Hao <jhao@mozilla.com>
Thu, 16 Mar 2017 18:46:59 +0800
changeset 499891 79fd709ee1f82ccfd097046db39582446153aef8
parent 499890 cade459828ec3752630ba41cdf5d2a8d88bf4f47
child 499892 123f9dd6d78da749a435ddd3d346290cb5e59218
push id49577
push userbmo:jhao@mozilla.com
push dateThu, 16 Mar 2017 10:52:48 +0000
reviewersbz
bugs1217238
milestone55.0a1
Bug 1217238 - Propagate changes of javascript.options.reduce_time_precision to workers. r=bz This pref is created for the next patch. Because we need to get this pref in workers, I added this pref to WorkerPrefs.h so RuntimeService will broadcast pref changes for us, and update all the workers recursively. This pref is also added to the js context options because the Date API needs it. MozReview-Commit-ID: JOkOR2Wek5C
browser/app/profile/firefox.js
dom/ipc/ContentPrefs.cpp
dom/workers/RuntimeService.cpp
dom/workers/RuntimeService.h
dom/workers/WorkerPrefs.h
dom/workers/WorkerPrivate.cpp
dom/workers/WorkerPrivate.h
js/src/jsapi.h
js/src/shell/js.cpp
js/xpconnect/src/XPCJSContext.cpp
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -529,16 +529,17 @@ pref("privacy.sanitize.sanitizeOnShutdow
 
 pref("privacy.sanitize.migrateFx3Prefs",    false);
 
 pref("privacy.panicButton.enabled",         true);
 
 pref("privacy.firstparty.isolate",                        false);
 pref("privacy.firstparty.isolate.restrict_opener_access", true);
 pref("privacy.resistFingerprinting", false);
+pref("javascript.options.privacy.reduce_time_precision", false);
 
 // Time until temporary permissions expire, in ms
 pref("privacy.temporary_permission_expire_time_ms",  3600000);
 
 pref("network.proxy.share_proxy_settings",  false); // use the same proxy settings for all protocols
 
 // simple gestures support
 pref("browser.gesture.swipe.left", "Browser:BackOrBackDuplicate");
--- a/dom/ipc/ContentPrefs.cpp
+++ b/dom/ipc/ContentPrefs.cpp
@@ -90,16 +90,17 @@ const char* mozilla::dom::ContentPrefs::
   "javascript.options.gczeal.frequency",
   "javascript.options.ion",
   "javascript.options.ion.offthread_compilation",
   "javascript.options.ion.threshold",
   "javascript.options.ion.unsafe_eager_compilation",
   "javascript.options.jit.full_debug_checks",
   "javascript.options.native_regexp",
   "javascript.options.parallel_parsing",
+  "javascript.options.privacy.reduce_time_precision",
   "javascript.options.shared_memory",
   "javascript.options.strict",
   "javascript.options.strict.debug",
   "javascript.options.throw_on_asmjs_validation_failure",
   "javascript.options.throw_on_debuggee_would_run",
   "javascript.options.wasm",
   "javascript.options.wasm_baselinejit",
   "javascript.options.werror",
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -1315,16 +1315,29 @@ PlatformOverrideChanged(const char* /* a
     mozilla::Preferences::GetString("general.platform.override");
 
   RuntimeService* runtime = RuntimeService::GetService();
   if (runtime) {
     runtime->UpdatePlatformOverridePreference(override);
   }
 }
 
+void
+ReduceTimePrecisionChanged(const char* /* aPrefName */, void* /* aClosure */)
+{
+  AssertIsOnMainThread();
+  bool reduceTimePrecision = mozilla::Preferences::GetBool(
+    "javascript.options.privacy.reduce_time_precision");
+
+  RuntimeService* runtime = RuntimeService::GetService();
+  if (runtime) {
+    runtime->UpdateReduceTimePrecisionPreference(reduceTimePrecision);
+  }
+}
+
 class BackgroundChildCallback final
   : public nsIIPCBackgroundChildCreateCallback
 {
 public:
   BackgroundChildCallback()
   {
     AssertIsOnMainThread();
   }
@@ -2626,16 +2639,23 @@ RuntimeService::UpdateAppVersionOverride
 void
 RuntimeService::UpdatePlatformOverridePreference(const nsAString& aValue)
 {
   AssertIsOnMainThread();
   mNavigatorProperties.mPlatformOverridden = aValue;
 }
 
 void
+RuntimeService::UpdateReduceTimePrecisionPreference(bool aReduceTimePrecision)
+{
+  AssertIsOnMainThread();
+  BROADCAST_ALL_WORKERS(UpdateReduceTimePrecision, aReduceTimePrecision);
+}
+
+void
 RuntimeService::UpdateAllWorkerPreference(WorkerPreference aPref, bool aValue)
 {
   BROADCAST_ALL_WORKERS(UpdatePreference, aPref, aValue);
 }
 
 void
 RuntimeService::UpdateAllWorkerLanguages(const nsTArray<nsString>& aLanguages)
 {
--- a/dom/workers/RuntimeService.h
+++ b/dom/workers/RuntimeService.h
@@ -192,16 +192,19 @@ public:
 
   void
   UpdateAppVersionOverridePreference(const nsAString& aValue);
 
   void
   UpdatePlatformOverridePreference(const nsAString& aValue);
 
   void
+  UpdateReduceTimePrecisionPreference(bool aReduceTimePrecision);
+
+  void
   UpdateAllWorkerContextOptions();
 
   void
   UpdateAllWorkerLanguages(const nsTArray<nsString>& aLanguages);
 
   void
   UpdateAllWorkerPreference(WorkerPreference aPref, bool aValue);
 
--- a/dom/workers/WorkerPrefs.h
+++ b/dom/workers/WorkerPrefs.h
@@ -39,11 +39,12 @@ WORKER_SIMPLE_PREF("dom.push.enabled", P
 WORKER_SIMPLE_PREF("dom.requestcontext.enabled", RequestContextEnabled, REQUESTCONTEXT_ENABLED)
 WORKER_SIMPLE_PREF("gfx.offscreencanvas.enabled", OffscreenCanvasEnabled, OFFSCREENCANVAS_ENABLED)
 WORKER_SIMPLE_PREF("dom.webkitBlink.dirPicker.enabled", WebkitBlinkDirectoryPickerEnabled, DOM_WEBKITBLINK_DIRPICKER_WEBKITBLINK)
 WORKER_SIMPLE_PREF("dom.netinfo.enabled", NetworkInformationEnabled, NETWORKINFORMATION_ENABLED)
 WORKER_PREF("intl.accept_languages", PrefLanguagesChanged)
 WORKER_PREF("general.appname.override", AppNameOverrideChanged)
 WORKER_PREF("general.appversion.override", AppVersionOverrideChanged)
 WORKER_PREF("general.platform.override", PlatformOverrideChanged)
+WORKER_PREF("javascript.options.privacy.reduce_time_precision", ReduceTimePrecisionChanged)
 #ifdef JS_GC_ZEAL
 WORKER_PREF("dom.workers.options.gcZeal", LoadGCZealOptions)
 #endif
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -1337,16 +1337,36 @@ private:
   virtual bool
   WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
   {
     aWorkerPrivate->UpdateContextOptionsInternal(aCx, mContextOptions);
     return true;
   }
 };
 
+class UpdateReduceTimePrecisionRunnable final : public WorkerControlRunnable
+{
+  bool mReduceTimePrecision;
+
+public:
+  UpdateReduceTimePrecisionRunnable(WorkerPrivate* aWorkerPrivate,
+                                    bool aReduceTimePrecision)
+  : WorkerControlRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount),
+    mReduceTimePrecision(aReduceTimePrecision)
+  { }
+
+private:
+  virtual bool
+  WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
+  {
+    aWorkerPrivate->UpdateReduceTimePrecisionInternal(mReduceTimePrecision);
+    return true;
+  }
+};
+
 class UpdatePreferenceRunnable final : public WorkerControlRunnable
 {
   WorkerPreference mPref;
   bool mValue;
 
 public:
   UpdatePreferenceRunnable(WorkerPrivate* aWorkerPrivate,
                            WorkerPreference aPref,
@@ -3430,16 +3450,30 @@ WorkerPrivateParent<Derived>::UpdateCont
     new UpdateContextOptionsRunnable(ParentAsWorkerPrivate(), aContextOptions);
   if (!runnable->Dispatch()) {
     NS_WARNING("Failed to update worker context options!");
   }
 }
 
 template <class Derived>
 void
+WorkerPrivateParent<Derived>::UpdateReduceTimePrecision(bool aReduceTimePrecision)
+{
+  AssertIsOnParentThread();
+
+  RefPtr<UpdateReduceTimePrecisionRunnable> runnable =
+    new UpdateReduceTimePrecisionRunnable(ParentAsWorkerPrivate(),
+                                          aReduceTimePrecision);
+  if (!runnable->Dispatch()) {
+    NS_WARNING("Failed to update worker time precision!");
+  }
+}
+
+template <class Derived>
+void
 WorkerPrivateParent<Derived>::UpdatePreference(WorkerPreference aPref, bool aValue)
 {
   AssertIsOnParentThread();
   MOZ_ASSERT(aPref >= 0 && aPref < WORKERPREF_COUNT);
 
   RefPtr<UpdatePreferenceRunnable> runnable =
     new UpdatePreferenceRunnable(ParentAsWorkerPrivate(), aPref, aValue);
   if (!runnable->Dispatch()) {
@@ -4451,21 +4485,24 @@ WorkerPrivate::WorkerPrivate(WorkerPriva
 {
   MOZ_ASSERT_IF(!IsDedicatedWorker(), !aWorkerName.IsVoid());
   MOZ_ASSERT_IF(IsDedicatedWorker(), aWorkerName.IsEmpty());
 
   if (aParent) {
     aParent->AssertIsOnWorkerThread();
     aParent->GetAllPreferences(mPreferences);
     mOnLine = aParent->OnLine();
+    mReduceTimePrecision = aParent->ReduceTimePrecision();
   }
   else {
     AssertIsOnMainThread();
     RuntimeService::GetDefaultPreferences(mPreferences);
     mOnLine = !NS_IsOffline();
+    mReduceTimePrecision =
+      Preferences::GetBool("javascript.options.privacy.reduce_time_precision");
   }
 
   nsCOMPtr<nsIEventTarget> target;
 
   // A child worker just inherits the parent workers ThrottledEventQueue
   // and main thread target for now.  This is mainly due to the restriction
   // that ThrottledEventQueue can only be created on the main thread at the
   // moment.
@@ -4964,16 +5001,18 @@ WorkerPrivate::DoRunLoop(JSContext* aCx)
   {
     MutexAutoLock lock(mMutex);
     mJSContext = aCx;
 
     MOZ_ASSERT(mStatus == Pending);
     mStatus = Running;
   }
 
+  JS::ContextOptionsRef(mJSContext).setReduceTimePrecision(mReduceTimePrecision);
+
   // Now that we've done that, we can go ahead and set up our AutoJSAPI.  We
   // can't before this point, because it can't find the right JSContext before
   // then, since it gets it from our mJSContext.
   AutoJSAPI jsapi;
   jsapi.Init();
   MOZ_ASSERT(jsapi.cx() == aCx);
 
   EnableMemoryReporter();
@@ -6644,16 +6683,29 @@ WorkerPrivate::UpdateLanguagesInternal(c
   }
 
   for (uint32_t index = 0; index < mChildWorkers.Length(); index++) {
     mChildWorkers[index]->UpdateLanguages(aLanguages);
   }
 }
 
 void
+WorkerPrivate::UpdateReduceTimePrecisionInternal(bool aReduceTimePrecision)
+{
+  AssertIsOnWorkerThread();
+
+  JS::ContextOptionsRef(mJSContext).setReduceTimePrecision(aReduceTimePrecision);
+  mReduceTimePrecision = aReduceTimePrecision;
+
+  for (uint32_t index = 0; index < mChildWorkers.Length(); index++) {
+    mChildWorkers[index]->UpdateReduceTimePrecision(aReduceTimePrecision);
+  }
+}
+
+void
 WorkerPrivate::UpdatePreferenceInternal(WorkerPreference aPref, bool aValue)
 {
   AssertIsOnWorkerThread();
   MOZ_ASSERT(aPref >= 0 && aPref < WORKERPREF_COUNT);
 
   mPreferences[aPref] = aValue;
 
   for (uint32_t index = 0; index < mChildWorkers.Length(); index++) {
--- a/dom/workers/WorkerPrivate.h
+++ b/dom/workers/WorkerPrivate.h
@@ -402,16 +402,19 @@ public:
 
   void
   UpdateContextOptions(const JS::ContextOptions& aContextOptions);
 
   void
   UpdateLanguages(const nsTArray<nsString>& aLanguages);
 
   void
+  UpdateReduceTimePrecision(bool aReduceTimePrecision);
+
+  void
   UpdatePreference(WorkerPreference aPref, bool aValue);
 
   void
   UpdateJSWorkerMemoryParameter(JSGCParamKey key, uint32_t value);
 
 #ifdef JS_GC_ZEAL
   void
   UpdateGCZeal(uint8_t aGCZeal, uint32_t aFrequency);
@@ -1037,16 +1040,17 @@ class WorkerPrivate : public WorkerPriva
   bool mPendingEventQueueClearing;
   bool mCancelAllPendingRunnables;
   bool mPeriodicGCTimerRunning;
   bool mIdleGCTimerRunning;
   bool mWorkerScriptExecutedSuccessfully;
   bool mFetchHandlerWasAdded;
   bool mPreferences[WORKERPREF_COUNT];
   bool mOnLine;
+  bool mReduceTimePrecision;
 
 protected:
   ~WorkerPrivate();
 
 public:
   static already_AddRefed<WorkerPrivate>
   Constructor(const GlobalObject& aGlobal, const nsAString& aScriptURL,
               ErrorResult& aRv);
@@ -1238,16 +1242,19 @@ public:
 
   void
   UpdateContextOptionsInternal(JSContext* aCx, const JS::ContextOptions& aContextOptions);
 
   void
   UpdateLanguagesInternal(const nsTArray<nsString>& aLanguages);
 
   void
+  UpdateReduceTimePrecisionInternal(bool aReduceTimePrecision);
+
+  void
   UpdatePreferenceInternal(WorkerPreference aPref, bool aValue);
 
   void
   UpdateJSWorkerMemoryParameterInternal(JSContext* aCx, JSGCParamKey key, uint32_t aValue);
 
   enum WorkerRanOrNot {
     WorkerNeverRan = 0,
     WorkerRan
@@ -1381,16 +1388,23 @@ public:
 
   bool
   OnLine() const
   {
     AssertIsOnWorkerThread();
     return mOnLine;
   }
 
+  bool
+  ReduceTimePrecision() const
+  {
+    AssertIsOnWorkerThread();
+    return mReduceTimePrecision;
+  }
+
   void
   StopSyncLoop(nsIEventTarget* aSyncLoopTarget, bool aResult);
 
   bool
   AllPendingRunnablesShouldBeCanceled() const
   {
     return mCancelAllPendingRunnables;
   }
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -1117,16 +1117,17 @@ class JS_PUBLIC_API(ContextOptions) {
     ContextOptions()
       : baseline_(true),
         ion_(true),
         asmJS_(true),
         wasm_(false),
         wasmAlwaysBaseline_(false),
         throwOnAsmJSValidationFailure_(false),
         nativeRegExp_(true),
+        reduceTimePrecision_(false),
         unboxedArrays_(false),
         asyncStack_(true),
         throwOnDebuggeeWouldRun_(true),
         dumpStackOnDebuggeeWouldRun_(false),
         werror_(false),
         strictMode_(false),
         extraWarnings_(false),
 #ifdef NIGHTLY_BUILD
@@ -1198,16 +1199,22 @@ class JS_PUBLIC_API(ContextOptions) {
     }
 
     bool nativeRegExp() const { return nativeRegExp_; }
     ContextOptions& setNativeRegExp(bool flag) {
         nativeRegExp_ = flag;
         return *this;
     }
 
+    bool reduceTimePrecision() const { return reduceTimePrecision_; }
+    ContextOptions& setReduceTimePrecision(bool flag) {
+        reduceTimePrecision_ = flag;
+        return *this;
+    }
+
     bool unboxedArrays() const { return unboxedArrays_; }
     ContextOptions& setUnboxedArrays(bool flag) {
         unboxedArrays_ = flag;
         return *this;
     }
 
     bool asyncStack() const { return asyncStack_; }
     ContextOptions& setAsyncStack(bool flag) {
@@ -1274,16 +1281,17 @@ class JS_PUBLIC_API(ContextOptions) {
   private:
     bool baseline_ : 1;
     bool ion_ : 1;
     bool asmJS_ : 1;
     bool wasm_ : 1;
     bool wasmAlwaysBaseline_ : 1;
     bool throwOnAsmJSValidationFailure_ : 1;
     bool nativeRegExp_ : 1;
+    bool reduceTimePrecision_ : 1;
     bool unboxedArrays_ : 1;
     bool asyncStack_ : 1;
     bool throwOnDebuggeeWouldRun_ : 1;
     bool dumpStackOnDebuggeeWouldRun_ : 1;
     bool werror_ : 1;
     bool strictMode_ : 1;
     bool extraWarnings_ : 1;
     bool forEachStatement_: 1;
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -345,16 +345,17 @@ struct MOZ_STACK_CLASS EnvironmentPrepar
 static bool enableCodeCoverage = false;
 static bool enableDisassemblyDumps = false;
 static bool offthreadCompilation = false;
 static bool enableBaseline = false;
 static bool enableIon = false;
 static bool enableAsmJS = false;
 static bool enableWasm = false;
 static bool enableNativeRegExp = false;
+static bool enableReduceTimePrecision = false;
 static bool enableUnboxedArrays = false;
 static bool enableSharedMemory = SHARED_MEMORY_DEFAULT;
 static bool enableWasmAlwaysBaseline = false;
 #ifdef JS_GC_ZEAL
 static uint32_t gZealBits = 0;
 static uint32_t gZealFrequency = 0;
 #endif
 static bool printTiming = false;
@@ -7707,25 +7708,28 @@ ProcessArgs(JSContext* cx, OptionParser*
 static bool
 SetContextOptions(JSContext* cx, const OptionParser& op)
 {
     enableBaseline = !op.getBoolOption("no-baseline");
     enableIon = !op.getBoolOption("no-ion");
     enableAsmJS = !op.getBoolOption("no-asmjs");
     enableWasm = !op.getBoolOption("no-wasm");
     enableNativeRegExp = !op.getBoolOption("no-native-regexp");
+    enableReduceTimePrecision =
+        !op.getBoolOption("reduce-time-precision");
     enableUnboxedArrays = op.getBoolOption("unboxed-arrays");
     enableWasmAlwaysBaseline = op.getBoolOption("wasm-always-baseline");
 
     JS::ContextOptionsRef(cx).setBaseline(enableBaseline)
                              .setIon(enableIon)
                              .setAsmJS(enableAsmJS)
                              .setWasm(enableWasm)
                              .setWasmAlwaysBaseline(enableWasmAlwaysBaseline)
                              .setNativeRegExp(enableNativeRegExp)
+                             .setReduceTimePrecision(enableReduceTimePrecision)
                              .setUnboxedArrays(enableUnboxedArrays);
 
     if (op.getBoolOption("wasm-check-bce"))
         jit::JitOptions.wasmAlwaysCheckBounds = true;
 
     if (op.getBoolOption("no-unboxed-objects"))
         jit::JitOptions.disableUnboxedObjects = true;
 
@@ -7997,16 +8001,17 @@ SetWorkerContextOptions(JSContext* cx)
 {
     // Copy option values from the main thread.
     JS::ContextOptionsRef(cx).setBaseline(enableBaseline)
                              .setIon(enableIon)
                              .setAsmJS(enableAsmJS)
                              .setWasm(enableWasm)
                              .setWasmAlwaysBaseline(enableWasmAlwaysBaseline)
                              .setNativeRegExp(enableNativeRegExp)
+                             .setReduceTimePrecision(enableReduceTimePrecision)
                              .setUnboxedArrays(enableUnboxedArrays);
     cx->runtime()->setOffthreadIonCompilationEnabled(offthreadCompilation);
     cx->runtime()->profilingScripts = enableCodeCoverage || enableDisassemblyDumps;
 
 #ifdef JS_GC_ZEAL
     if (gZealBits && gZealFrequency) {
 #define ZEAL_MODE(_, value)                        \
         if (gZealBits & (1 << value))              \
@@ -8190,16 +8195,17 @@ main(int argc, char** argv, char** envp)
                                          "shell's global")
         || !op.addIntOption('\0', "thread-count", "COUNT", "Use COUNT auxiliary threads "
                             "(default: # of cores - 1)", -1)
         || !op.addBoolOption('\0', "ion", "Enable IonMonkey (default)")
         || !op.addBoolOption('\0', "no-ion", "Disable IonMonkey")
         || !op.addBoolOption('\0', "no-asmjs", "Disable asm.js compilation")
         || !op.addBoolOption('\0', "no-wasm", "Disable WebAssembly compilation")
         || !op.addBoolOption('\0', "no-native-regexp", "Disable native regexp compilation")
+        || !op.addBoolOption('\0', "reduce-time-precision", "Reduce time precision")
         || !op.addBoolOption('\0', "no-unboxed-objects", "Disable creating unboxed plain objects")
         || !op.addBoolOption('\0', "unboxed-arrays", "Allow creating unboxed arrays")
         || !op.addBoolOption('\0', "wasm-always-baseline", "Enable wasm baseline compiler when possible")
         || !op.addBoolOption('\0', "wasm-check-bce", "Always generate wasm bounds check, even redundant ones.")
 #ifdef ENABLE_SHARED_ARRAY_BUFFER
         || !op.addStringOption('\0', "shared-memory", "on/off",
                                "SharedArrayBuffer and Atomics "
 #  if SHARED_MEMORY_DEFAULT
--- a/js/xpconnect/src/XPCJSContext.cpp
+++ b/js/xpconnect/src/XPCJSContext.cpp
@@ -1485,16 +1485,17 @@ ReloadPrefsCallback(const char* pref, vo
     bool useBaseline = Preferences::GetBool(JS_OPTIONS_DOT_STR "baselinejit") && !safeMode;
     bool useIon = Preferences::GetBool(JS_OPTIONS_DOT_STR "ion") && !safeMode;
     bool useAsmJS = Preferences::GetBool(JS_OPTIONS_DOT_STR "asmjs") && !safeMode;
     bool useWasm = Preferences::GetBool(JS_OPTIONS_DOT_STR "wasm") && !safeMode;
     bool useWasmBaseline = Preferences::GetBool(JS_OPTIONS_DOT_STR "wasm_baselinejit") && !safeMode;
     bool throwOnAsmJSValidationFailure = Preferences::GetBool(JS_OPTIONS_DOT_STR
                                                               "throw_on_asmjs_validation_failure");
     bool useNativeRegExp = Preferences::GetBool(JS_OPTIONS_DOT_STR "native_regexp") && !safeMode;
+    bool reduceTimePrecision = Preferences::GetBool(JS_OPTIONS_DOT_STR "privacy.reduce_time_precision") && !safeMode;
 
     bool parallelParsing = Preferences::GetBool(JS_OPTIONS_DOT_STR "parallel_parsing");
     bool offthreadIonCompilation = Preferences::GetBool(JS_OPTIONS_DOT_STR
                                                        "ion.offthread_compilation");
     bool useBaselineEager = Preferences::GetBool(JS_OPTIONS_DOT_STR
                                                  "baselinejit.unsafe_eager_compilation");
     bool useIonEager = Preferences::GetBool(JS_OPTIONS_DOT_STR "ion.unsafe_eager_compilation");
 #ifdef DEBUG
@@ -1540,16 +1541,17 @@ ReloadPrefsCallback(const char* pref, vo
 
     JS::ContextOptionsRef(cx).setBaseline(useBaseline)
                              .setIon(useIon)
                              .setAsmJS(useAsmJS)
                              .setWasm(useWasm)
                              .setWasmAlwaysBaseline(useWasmBaseline)
                              .setThrowOnAsmJSValidationFailure(throwOnAsmJSValidationFailure)
                              .setNativeRegExp(useNativeRegExp)
+                             .setReduceTimePrecision(reduceTimePrecision)
                              .setAsyncStack(useAsyncStack)
                              .setThrowOnDebuggeeWouldRun(throwOnDebuggeeWouldRun)
                              .setDumpStackOnDebuggeeWouldRun(dumpStackOnDebuggeeWouldRun)
                              .setWerror(werror)
 #ifdef FUZZING
                              .setFuzzing(fuzzingEnabled)
 #endif
                              .setExtraWarnings(extraWarnings);