Bug 1353006 - Stop using sdk/window/utils in JSONViewer; r=jryans
MozReview-Commit-ID: 5znvDLtUjWO
--- a/devtools/client/jsonview/utils.js
+++ b/devtools/client/jsonview/utils.js
@@ -3,17 +3,16 @@
/* 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/. */
"use strict";
const { Cu, Cc, Ci } = require("chrome");
const Services = require("Services");
-const { getMostRecentBrowserWindow } = require("sdk/window/utils");
const OPEN_FLAGS = {
RDONLY: parseInt("0x01", 16),
WRONLY: parseInt("0x02", 16),
CREATE_FILE: parseInt("0x08", 16),
APPEND: parseInt("0x10", 16),
TRUNCATE: parseInt("0x20", 16),
EXCL: parseInt("0x80", 16)
@@ -30,17 +29,17 @@ exports.getTargetFile = function () {
reject(null);
return;
}
filePickerShown = true;
let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
- let win = getMostRecentBrowserWindow();
+ let win = Services.wm.getMostRecentWindow("navigator:browser");
fp.init(win, null, Ci.nsIFilePicker.modeSave);
fp.appendFilter("JSON Files", "*.json; *.jsonp;");
fp.appendFilters(Ci.nsIFilePicker.filterText);
fp.appendFilters(Ci.nsIFilePicker.filterAll);
fp.filterIndex = 0;
fp.open(rv => {
filePickerShown = false;