Open Bug 1636889 Opened 4 years ago Updated 1 year ago

`nsCOMPtr` instance is not known to be live when called in method annotated with `MOZ_CAN_RUN_SCRIPT`

Categories

(Developer Infrastructure :: Source Code Analysis, defect, P2)

Tracking

(Not tracked)

People

(Reporter: mbrodesser-Igalia, Unassigned)

References

Details

The severity field is not set for this bug.
:andi, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(bpostelnicu)

maybe I'm missing something but can you specify what were you expecting here to happen?

Flags: needinfo?(bpostelnicu)
Flags: needinfo?(mbrodesser)

(In reply to Andi-Bogdan Postelnicu [:andi] from comment #2)

maybe I'm missing something but can you specify what were you expecting here to happen?

I think the point is that offsets lives on the stack and is therefore holding its members (including the nsCOMPtr) alive. This case shouldn't be considered any different from a bare nsCOMPtr that lives on the stack.

(In reply to Nathan Froyd [:froydnj] from comment #3)

(In reply to Andi-Bogdan Postelnicu [:andi] from comment #2)

maybe I'm missing something but can you specify what were you expecting here to happen?

I think the point is that offsets lives on the stack and is therefore holding its members (including the nsCOMPtr) alive. This case shouldn't be considered any different from a bare nsCOMPtr that lives on the stack.

Yes, that's what I meant. Thanks for the explanation.

Flags: needinfo?(mbrodesser)

The severity field is not set for this bug.
:andi, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(bpostelnicu)
Severity: -- → S2
Flags: needinfo?(bpostelnicu)
Priority: -- → P2

When fixing this bug, we should also remove the corresponding MOZ_KnownLives (e.g. https://searchfox.org/mozilla-central/rev/07342ce09126c513540c1c343476e026cfa907bf/layout/generic/nsFrameSelection.cpp#1311).

Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.