Closed
Bug 343643
Opened 18 years ago
Closed 18 years ago
Inconsistent casting of nsIObserver to nsISupports may lead to object leaks
Categories
(Core Graveyard :: Embedding: GRE Core, defect)
Core Graveyard
Embedding: GRE Core
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mikhail.zabaluev, Assigned: mikhail.zabaluev)
Details
(Keywords: memory-leak)
Attachments
(1 file)
835 bytes,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4 Build Identifier: Xulrunner trunk In nsCommandManager, there is an inconsistency between AddCommandObserver and RemoveCommandObserver in how the object passed as nsIObserver is casted to nsISupports to do operations on the observer array. In the former, it's a QI, but the latter uses an implicit static cast. This, depending on the observer's interface map, may lead to spurious failures of RemoveCommandObserver and object leaks. Reproducible: Always
Assignee | ||
Comment 1•18 years ago
|
||
Updated•18 years ago
|
Assignee: nobody → mhz
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•18 years ago
|
Attachment #228146 -
Flags: superreview+
Attachment #228146 -
Flags: review+
Comment 2•18 years ago
|
||
Fix checked in. Thanks for the patch!
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•