Bug 1296412 - use System.appinfo, not services.js, in inspector; r?bgrins draft
authorTom Tromey <tom@tromey.com>
Thu, 18 Aug 2016 14:08:19 -0600
changeset 402834 12f689405a32a5755c674c4acd74c13b69081285
parent 402833 dce857dd57e2d91ae4c6014cf21e93ef95e4dd36
child 528763 5c601e2f93607b4f2de804a151f5d3bbdf192561
push id26758
push userbmo:ttromey@mozilla.com
push dateThu, 18 Aug 2016 20:09:05 +0000
reviewersbgrins
bugs1296412
milestone51.0a1
Bug 1296412 - use System.appinfo, not services.js, in inspector; r?bgrins MozReview-Commit-ID: 8TjHP1GBb1i
devtools/client/inspector/inspector-search.js
--- a/devtools/client/inspector/inspector-search.js
+++ b/devtools/client/inspector/inspector-search.js
@@ -3,19 +3,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const promise = require("promise");
 const {Task} = require("devtools/shared/task");
 const {KeyCodes} = require("devtools/client/shared/keycodes");
 
-const system = require("devtools/shared/system");
 const EventEmitter = require("devtools/shared/event-emitter");
 const {AutocompletePopup} = require("devtools/client/shared/autocomplete-popup");
+const Services = require("Services");
 
 // Maximum number of selector suggestions shown in the panel.
 const MAX_SUGGESTIONS = 15;
 
 /**
  * Converts any input field into a document search box.
  *
  * @param {InspectorPanel} inspector
@@ -125,17 +125,17 @@ InspectorSearch.prototype = {
     } else {
       this.searchClearButton.hidden = false;
       this.searchBox.setAttribute("filled", true);
     }
     if (event.keyCode === KeyCodes.DOM_VK_RETURN) {
       this._onSearch(event.shiftKey);
     }
 
-    const modifierKey = system.constants.platform === "macosx"
+    const modifierKey = Services.appinfo.OS === "Darwin"
                         ? event.metaKey : event.ctrlKey;
     if (event.keyCode === KeyCodes.DOM_VK_G && modifierKey) {
       this._onSearch(event.shiftKey);
       event.preventDefault();
     }
   },
 
   /**