Bug 1353542 - massive script-generated patch converting Task.async and Task.spawn calls, and generators clearly identifiable as tasks, rs=Mossop.
This commit is contained in:
@@ -274,11 +274,11 @@ function promiseRecoveryFileContents() {
|
||||
});
|
||||
}
|
||||
|
||||
var promiseForEachSessionRestoreFile = Task.async(function*(cb) {
|
||||
var promiseForEachSessionRestoreFile = async function(cb) {
|
||||
for (let key of SessionFile.Paths.loadOrder) {
|
||||
let data = "";
|
||||
try {
|
||||
data = yield OS.File.read(SessionFile.Paths[key], { encoding: "utf-8" });
|
||||
data = await OS.File.read(SessionFile.Paths[key], { encoding: "utf-8" });
|
||||
} catch (ex) {
|
||||
// Ignore missing files
|
||||
if (!(ex instanceof OS.File.Error && ex.becauseNoSuchFile)) {
|
||||
@@ -287,7 +287,7 @@ var promiseForEachSessionRestoreFile = Task.async(function*(cb) {
|
||||
}
|
||||
cb(data, key);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function promiseBrowserLoaded(aBrowser, ignoreSubFrames = true, wantLoad = null) {
|
||||
return BrowserTestUtils.browserLoaded(aBrowser, !ignoreSubFrames, wantLoad);
|
||||
@@ -522,7 +522,7 @@ function promiseRemoveTab(tab) {
|
||||
|
||||
// Write DOMSessionStorage data to the given browser.
|
||||
function modifySessionStorage(browser, storageData, storageOptions = {}) {
|
||||
return ContentTask.spawn(browser, [storageData, storageOptions], function* ([data, options]) {
|
||||
return ContentTask.spawn(browser, [storageData, storageOptions], async function([data, options]) {
|
||||
let frame = content;
|
||||
if (options && "frameIndex" in options) {
|
||||
frame = content.frames[options.frameIndex];
|
||||
|
||||
Reference in New Issue
Block a user