Closed
Bug 1744809
Opened 4 years ago
Closed 4 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: beth, Assigned: beth)
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•4 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•4 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•4 years ago
|
Flags: needinfo?(brennie)
| Assignee | ||
Comment 4•4 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•4 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 4 years ago
status-firefox97:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Updated•2 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•