Open
Bug 1541433
Opened 6 years ago
Updated 2 months ago
Add a static analysis that detects Promises that are dropped on the floor
Categories
(Developer Infrastructure :: Source Code Analysis, task, P3)
Developer Infrastructure
Source Code Analysis
Tracking
(Not tracked)
NEW
People
(Reporter: ehsan.akhgari, Unassigned)
References
Details
See https://bugzilla.mozilla.org/show_bug.cgi?id=1498102#c54 and the resulting fix (https://hg.mozilla.org/integration/autoland/rev/3236fd896ae0).
The interesting pattern to detect here is when we have:
void f() {
RefPtr<Promise> promise = foo();
// promise won't escape
}
We should statically verify that the promise is either passed to something (e.g. returned to the caller or passed to another function) or a method that adds a rejection handler to it is called on it, like AppendNativeHandler(), Then(), etc.
Comment 1•6 years ago
|
||
The priority flag is not set for this bug.
:sylvestre, could you have a look please?
Flags: needinfo?(sledru)
Updated•6 years ago
|
Type: defect → task
Flags: needinfo?(sledru)
Priority: -- → P3
Updated•3 years ago
|
Product: Firefox Build System → Developer Infrastructure
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•