Closed
Bug 1744809
Opened 2 years ago
Closed 2 years ago
Remove boilerplate in IOUtils frontend methods
Categories
(Toolkit Graveyard :: OS.File, enhancement, P1)
Toolkit Graveyard
OS.File
Tracking
(firefox97 fixed)
RESOLVED
FIXED
97 Branch
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: barret, Assigned: barret)
Details
Attachments
(1 file)
IOUtils frontend methods all look like:
IOUtils::Method(GlobalObject& aGlobal, ...) {
MOZ_DIAGNOSTIC_ASSERT(XRE_IsParentProcess());
RefPtr<Promise> promise = CreateJSPromise(aGlobal);
if (!promise) {
return nullptr;
}
if (auto state = GetState()) {
// Do actual unique work
} else {
RejectShuttingDown(promise);
}
return promise.forget();
}
which is a lot of boilerplate per method. We should remove this boilerplate if we can to make maintenance easier.
Assignee | ||
Comment 1•2 years ago
|
||
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dbbcea46c9d9 Reduce boilerplate in IOUtils frontend methods r=nika
Comment 3•2 years ago
•
|
||
Backed out 2 changesets (Bug 1744809, Bug 1744316) for causing xpcshell failures on marAppApplyDirLockedStageFailure_win.js.
Backout link
Push with failures
Failure Log
Flags: needinfo?(brennie)
Assignee | ||
Updated•2 years ago
|
Flags: needinfo?(brennie)
Assignee | ||
Comment 4•2 years ago
|
||
The failure was in the other patch. Going to land them separately.
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5fd7e5380524 Reduce boilerplate in IOUtils frontend methods r=nika
Comment 6•2 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 2 years ago
status-firefox97:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Updated•11 months ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•