Bug 479006 - get rid of crufty timeline service globals [dead code]. r=frg a=frg,jorgk DONTBUILD
authorIan Neal <iann_cvs@blueyonder.co.uk>
Sun, 27 Oct 2019 23:39:07 +0100
changeset 32342 2fb641eea70251ed955ff49e3a0d85e325f1daac
parent 32341 726f4cc0e25ea45b2f161bda2644aeea522ba3f2
child 32343 af96810c66f29ba5017edfd72d2cf979cc407d6f
push id224
push userfrgrahl@gmx.net
push dateSun, 27 Oct 2019 22:39:57 +0000
treeherdercomm-esr60@2fb641eea702 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrg, frg, jorgk
bugs479006
Bug 479006 - get rid of crufty timeline service globals [dead code]. r=frg a=frg,jorgk DONTBUILD
mail/base/content/SearchDialog.js
mailnews/mailnews.js
suite/mailnews/content/SearchDialog.js
suite/mailnews/content/commandglue.js
suite/mailnews/content/mailWindow.js
suite/mailnews/content/mailWindowOverlay.js
--- a/mail/base/content/SearchDialog.js
+++ b/mail/base/content/SearchDialog.js
@@ -12,17 +12,16 @@ var gFolderDisplay;
 // Although we don't display messages, we have a message display object to
 //  simplify our code.  It's just always disabled.
 var gMessageDisplay;
 
 var nsIMsgWindow = Ci.nsIMsgWindow;
 
 var gFolderPicker;
 var gStatusFeedback;
-var gTimelineEnabled = false;
 var RDF;
 var gSearchBundle;
 
 // Datasource search listener -- made global as it has to be registered
 // and unregistered in different functions.
 var gDataSourceSearchListener;
 var gViewSearchListener;
 
--- a/mailnews/mailnews.js
+++ b/mailnews/mailnews.js
@@ -1,19 +1,16 @@
 /* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // SpaceHit() function: whether spacebar advances to next unread message.
 pref("mail.advance_on_spacebar", true);
 
-//mailnews.timeline_is_enabled should be set to true ONLY for perf measurement-timeline builds.
-pref("mailnews.timeline_is_enabled", false);
-
 pref("mailnews.logComposePerformance", false);
 
 pref("mail.wrap_long_lines",                true);
 pref("mail.inline_attachments",             true);
 pref("mail.reply_quote_inline",             false);
 // When in a message the List-Post header contains the content of the Reply-To
 // (which is called "Reply-To Munging") we override the Reply-To header with
 // the From header.
--- a/suite/mailnews/content/SearchDialog.js
+++ b/suite/mailnews/content/SearchDialog.js
@@ -13,17 +13,16 @@ var gMsgFolderSelected;
 var nsIMsgFolder = Ci.nsIMsgFolder;
 var nsIMsgWindow = Ci.nsIMsgWindow;
 var nsMsgSearchScope = Ci.nsMsgSearchScope;
 
 var gFolderDatasource;
 var gFolderPicker;
 var gStatusBar = null;
 var gStatusFeedback = new nsMsgStatusFeedback();
-var gTimelineEnabled = false;
 var gMessengerBundle = null;
 var RDF;
 var gSearchBundle;
 var gNextMessageViewIndexAfterDelete = -2;
 
 // Datasource search listener -- made global as it has to be registered
 // and unregistered in different functions.
 var gDataSourceSearchListener;
--- a/suite/mailnews/content/commandglue.js
+++ b/suite/mailnews/content/commandglue.js
@@ -696,21 +696,16 @@ function FolderPaneSelectionChange()
     // has right-clicked on a folder different from the one that was
     // originally highlighted.  On a right-click, the highlight (selection)
     // of a row will be different from the value of currentIndex, thus if
     // the currentIndex is not selected, it means the user right-clicked
     // and we don't want to load the contents of the folder.
     if (!folderSelection.isSelected(folderSelection.currentIndex))
       return;
 
-    if(gTimelineEnabled) {
-      gTimelineService.startTimer("FolderLoading");
-      gTimelineService.enter("FolderLoading has Started");
-    }
-
     gVirtualFolderTerms = null;
     gXFVirtualFolderTerms = null;
 
     let folders = GetSelectedMsgFolders();
     if (folders.length == 1)
     {
         let msgFolder = folders[0];
         let uriToLoad = msgFolder.URI;
@@ -940,17 +935,16 @@ var gSearchSession;
 
 var nsIMsgFolder = Ci.nsIMsgFolder;
 var nsIMsgWindow = Ci.nsIMsgWindow;
 var nsMsgSearchScope = Ci.nsMsgSearchScope;
 
 var gFolderDatasource;
 var gFolderPicker;
 var gStatusBar = null;
-var gTimelineEnabled = false;
 var gMessengerBundle = null;
 
 // Datasource search listener -- made global as it has to be registered
 // and unregistered in different functions.
 var gDataSourceSearchListener;
 var gViewSearchListener;
 
 var gMailSession;
--- a/suite/mailnews/content/mailWindow.js
+++ b/suite/mailnews/content/mailWindow.js
@@ -475,21 +475,16 @@ nsMsgStatusFeedback.prototype =
       if (this.stopTimeoutID)
       {
         clearTimeout(this.stopTimeoutID);
         this.stopTimeoutID = null;
       }
   },
    _stopMeteors : function()
     {
-      if(gTimelineEnabled){
-        gTimelineService.stopTimer("FolderLoading");
-        gTimelineService.markTimer("FolderLoading");
-        gTimelineService.resetTimer("FolderLoading");
-      }
       this.ensureStatusFields();
       this.showStatusString(this.myDefaultStatus);
 
       // stop the throbber
       if (this.throbber)
         this.throbber.setAttribute("busy", false);
 
       // Turn progress meter off.
--- a/suite/mailnews/content/mailWindowOverlay.js
+++ b/suite/mailnews/content/mailWindowOverlay.js
@@ -32,32 +32,16 @@ var kNotAPhishMessage = 1;
 var kMsgForwardAsAttachment = 0;
 
 var gMessengerBundle;
 var gOfflineManager;
 var gCopyService = Cc["@mozilla.org/messenger/messagecopyservice;1"]
                      .getService(Ci.nsIMsgCopyService);
 var gMarkViewedMessageAsReadTimer = null; // if the user has configured the app to mark a message as read if it is viewed for more than n seconds
 
-var gTimelineService = null;
-var gTimelineEnabled = ("@mozilla.org;timeline-service;1" in Cc);
-if (gTimelineEnabled) {
-  try {
-    gTimelineEnabled = Services.prefs.getBoolPref("mailnews.timeline_is_enabled");
-    if (gTimelineEnabled) {
-      gTimelineService =
-        Cc["@mozilla.org;timeline-service;1"].getService(Ci.nsITimelineService);
-    }
-  }
-  catch (ex)
-  {
-    gTimelineEnabled = false;
-  }
-}
-
 var gDisallow_classes_no_html = 1; /* the user preference,
      if HTML is not allowed. I assume, that the user could have set this to a
      value > 1 in his prefs.js or user.js, but that the value will not
      change during runtime other than through the MsgBody*() functions below.*/
 
 // Disable the File | New | Account... menu item if the account preference is locked.
 // Two other affected areas are the account central and the account manager dialogs.
 function menu_new_init()