Bug 1818868 - Port osfile.jsm usage to IOUtils in browser/components/migration/ r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D170976
This commit is contained in:
@@ -76,8 +76,7 @@ export const ESE = {};
|
||||
ESE.JET_ERR = ctypes.long;
|
||||
ESE.JET_PCWSTR = ctypes.char16_t.ptr;
|
||||
// The ESE header calls this JET_API_PTR, but because it isn't ever used as a
|
||||
// pointer and because OS.File code implies that the name you give a type
|
||||
// matters, I opted for a different name.
|
||||
// pointer, I opted for a different name.
|
||||
// Note that this is defined differently on 32 vs. 64-bit in the header.
|
||||
ESE.JET_API_ITEM =
|
||||
ctypes.voidptr_t.size == 4 ? ctypes.unsigned_long : ctypes.uint64_t;
|
||||
|
||||
@@ -249,13 +249,11 @@ add_task(async function setup() {
|
||||
let dirSvcFile = do_get_file(dirSvcPath);
|
||||
registerFakePath(pathId, dirSvcFile);
|
||||
|
||||
// We don't import osfile.jsm until after registering the fake path, because
|
||||
// importing osfile will sometimes greedily fetch certain path identifiers
|
||||
// from the dir service, which means they get cached, which means we can't
|
||||
// register a fake path for them anymore.
|
||||
const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
|
||||
info(OS.Path.join(dirSvcFile.path, ...profilePathSegments));
|
||||
let loginDataFilePath = OS.Path.join(dirSvcFile.path, ...profilePathSegments);
|
||||
info(PathUtils.join(dirSvcFile.path, ...profilePathSegments));
|
||||
let loginDataFilePath = PathUtils.join(
|
||||
dirSvcFile.path,
|
||||
...profilePathSegments
|
||||
);
|
||||
dbConn = await Sqlite.openConnection({ path: loginDataFilePath });
|
||||
|
||||
if (AppConstants.platform == "macosx") {
|
||||
|
||||
Reference in New Issue
Block a user