Closed Bug 1659959 Opened 2 years ago Closed 2 years ago

Introduce QM_FAIL macro and quota client specific equivalents

Categories

(Core :: Storage: Quota Manager, task, P2)

task

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: janv, Assigned: janv)

Details

Attachments

(1 file)

This was raised in D87565

For now we tried to have just two macros QM_TRY/QM_TRY_VAR, but we might make an exception for this special case.

So instead of writing:

QM_TRY(OkIf(false), NS_ERROR_FAILURE);
// or
QM_TRY(Fail(), NS_ERROR_FAILURE);

We would write:

QM_FAIL(NS_ERROR_FAILURE);

This would also support custom cleanup functions:

QM_FAIL(NS_ERROR_FAILURE, []() {
  NS_WARNING("...");
});
Summary: Introduce QM_FAIL macro → Introduce QM_FAIL macro and quota client specific equivalents
Pushed by jvarga@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/20f6b7bc22cf
Introduce QM_FAIL macro and quota client specific equivalents; r=dom-workers-and-storage-reviewers,sg
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.