Bug 1467117 - remove unneeded sort() of devtools definitions;r=daisuke
authorJulian Descottes <jdescottes@mozilla.com>
Wed, 06 Jun 2018 16:03:44 +0200
changeset 475935 884f30832a458f3fc5f7363ceada29f953583526
parent 475934 51086f4622b31c4183b7400692ba759d18858f52
child 475936 600510ecf7d2678035b07a30a025f50de03649e0
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdaisuke
bugs1467117
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1467117 - remove unneeded sort() of devtools definitions;r=daisuke MozReview-Commit-ID: JxZX4lRSasv
devtools/client/framework/toolbox-tabs-order-manager.js
--- a/devtools/client/framework/toolbox-tabs-order-manager.js
+++ b/devtools/client/framework/toolbox-tabs-order-manager.js
@@ -154,26 +154,16 @@ class ToolboxTabsOrderManager {
     this.dragTarget = null;
     this.toolboxContainerElement = null;
     this.toolboxTabsElement = null;
   }
 }
 
 function sortPanelDefinitions(definitions) {
   const pref = Services.prefs.getCharPref(PREFERENCE_NAME, "");
-
-  if (!pref) {
-    definitions.sort(definition => {
-      return -1 * (definition.ordinal == undefined || definition.ordinal < 0
-        ? Number.MAX_VALUE
-        : definition.ordinal
-      );
-    });
-  }
-
   const toolIds = pref.split(",");
 
   return definitions.sort((a, b) => {
     let orderA = toolIds.indexOf(a.extensionId || a.id);
     let orderB = toolIds.indexOf(b.extensionId || b.id);
     orderA = orderA < 0 ? Number.MAX_VALUE : orderA;
     orderB = orderB < 0 ? Number.MAX_VALUE : orderB;
     return orderA - orderB;