Commit eeb274e7 authored by brizental's avatar brizental Committed by Pier Angelo Vendrame
Browse files

fixup! BB 44045: Disable ML features.

Bug 45120: Disable smartwindow feature

Even when disabled, this feature still was using the EngineProcess to
download models. I have made this conditional, because trying to use
that was causing a runtime error preventing initialization to complete
successfully and whenever a new window was opened e.g. through "Open
Link In New Window", the browser crashed completely.
parent 9438264e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -136,7 +136,11 @@ export const AIWindow = {
    Services.obs.addObserver(this, lazy.ONLOGOUT_NOTIFICATION);
    Services.obs.addObserver(this, "tabstrip-orientation-change");
    lazy.SmartWindowTelemetry.init();
    if (this.isAIWindowEnabled()) {
      // Depends on the ml component, which tor-browser#44045 excludes from
      // the build, so only touch it when AI Window is actually enabled.
      lazy.getAllModelsData(); // loads model data into cache for about:preferences
    }
    lazy.NimbusFeatures.smartWindow.onUpdate(this.onNimbusUpdate);
    this._initialized = true;
    this._updateSwitcherWidgetRegistration();