If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

add kungFuDeathGrip(this) before calling HandleEvent

RESOLVED FIXED

Status

()

Core
Layout: View Rendering
RESOLVED FIXED
12 years ago
11 years ago

People

(Reporter: Feng Qian (Google), Assigned: roc)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
nsViewManager::HandleEvent may call a function that deletes |this| view pointer. If |this| is used after the call, the application may crash.
(Reporter)

Comment 1

12 years ago
Created attachment 222419 [details] [diff] [review]
add kungFuDeathGrip(this) before HandleEvent
Attachment #222419 - Flags: review?
(Reporter)

Updated

12 years ago
Attachment #222419 - Flags: review? → review?(roc)
Comment on attachment 222419 [details] [diff] [review]
add kungFuDeathGrip(this) before HandleEvent

Passers-by reading this bug should be aware that there currently is no dangerous usage of 'this' that is not already covered by another death-grip, so this patch does not fix any actual crash. However it's good to be clear about what's going on and to silence warnings from Feng's tool.
Attachment #222419 - Flags: superreview+
Attachment #222419 - Flags: review?(roc)
Attachment #222419 - Flags: review+
(Reporter)

Comment 3

12 years ago
(In reply to comment #2)
> (From update of attachment 222419 [details] [diff] [review] [edit])
> Passers-by reading this bug should be aware that there currently is no
> dangerous usage of 'this' that is not already covered by another death-grip, so
> this patch does not fix any actual crash. However it's good to be clear about
> what's going on and to silence warnings from Feng's tool.
> 

roc: I have no write permission to cvs yet, can you commit the patch?
OK

Comment 5

12 years ago
Aren't we trying to get rid of the kungFuDeathGrip(this) pattern, not expand its use?  See bug 329937.
hmm okay. Then the death-grip needs to be taken in HandleEvent in nsView.cpp.
(Reporter)

Updated

11 years ago
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.