Closed Bug 1563624 Opened 5 years ago Closed 3 years ago

Reject async IPC promises if `Resolver` argument is dropped

Categories

(Core :: IPC, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: nika, Assigned: nika)

References

(Depends on 1 open bug, Regressed 1 open bug)

Details

Attachments

(2 files)

Currently, if the Resolver argument to an async IPC callback is dropped on the floor, the promise on the other side is never resolved until the actor in question is destroyed. This means it's possible to forget to call the resolver, not hold a reference to it, and it will never be called.

We could detect if the last reference to the resolver has been dropped, and automatically reject the promise now that it will never be fulfilled.

Priority: -- → P3
Assignee: nobody → nika
Status: NEW → ASSIGNED
Pushed by nlayzell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/90f08512c313
Part 1: Add a weak reference variant of ActorLifecycleProxy for IPDL internal use, r=mccr8
https://hg.mozilla.org/integration/autoland/rev/66109fd063dd
Part 2: Automatically reject async IPC responses when the resolver is dropped, r=mccr8
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Depends on: 1699986
Regressions: 1699986
See Also: → 1529811
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: