зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1772916 - Port osfile.jsm usage to IOUtils in devtools/client/ r=nchevobbe
The bulk was removed in bug 1771608, but some vestigial bits were missed. We cannot yet fix the remaining import in devtools/shared/ until we have a way to replace osfile.jsm in a content process. Differential Revision: https://phabricator.services.mozilla.com/D153700
This commit is contained in:
Родитель
069a57c16d
Коммит
6f5b726ae5
|
@ -13,7 +13,6 @@ registerCleanupFunction(() => {
|
|||
Services.prefs.clearUserPref("devtools.debugger.log");
|
||||
});
|
||||
|
||||
var { OS } = require("resource://gre/modules/osfile.jsm");
|
||||
var { FileUtils } = require("resource://gre/modules/FileUtils.jsm");
|
||||
var { expectState } = require("devtools/server/actors/common");
|
||||
var HeapSnapshotFileUtils = require("devtools/shared/heapsnapshot/HeapSnapshotFileUtils");
|
||||
|
|
|
@ -23,7 +23,6 @@ declare namespace MockedExports {
|
|||
interface KnownModules {
|
||||
Services: typeof import("Services");
|
||||
chrome: typeof import("chrome");
|
||||
"resource://gre/modules/osfile.jsm": typeof import("resource://gre/modules/osfile.jsm");
|
||||
"resource://gre/modules/AppConstants.jsm": typeof import("resource://gre/modules/AppConstants.jsm");
|
||||
"resource:///modules/CustomizableUI.jsm": typeof import("resource:///modules/CustomizableUI.jsm");
|
||||
"resource:///modules/CustomizableWidgets.jsm": typeof import("resource:///modules/CustomizableWidgets.jsm");
|
||||
|
@ -206,25 +205,6 @@ declare namespace MockedExports {
|
|||
};
|
||||
};
|
||||
|
||||
const osfileJSM: {
|
||||
OS: {
|
||||
Path: {
|
||||
split: (
|
||||
path: string
|
||||
) => {
|
||||
absolute: boolean;
|
||||
components: string[];
|
||||
winDrive?: string;
|
||||
};
|
||||
join: (...pathParts: string[]) => string;
|
||||
};
|
||||
File: {
|
||||
stat: (path: string) => Promise<{ isDir: boolean }>;
|
||||
Error: any;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
interface BrowsingContextStub {}
|
||||
interface PrincipalStub {}
|
||||
|
||||
|
@ -364,10 +344,6 @@ declare module "ChromeUtils" {
|
|||
export = ChromeUtils;
|
||||
}
|
||||
|
||||
declare module "resource://gre/modules/osfile.jsm" {
|
||||
export = MockedExports.osfileJSM;
|
||||
}
|
||||
|
||||
declare module "resource://gre/modules/AppConstants.jsm" {
|
||||
export = MockedExports.AppConstantsJSM;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче