Remove some nsIDocument QIs from txMozillaTextOutput.cpp

RESOLVED FIXED in mozilla1.9.1b1

Status

()

Core
XSLT
P5
trivial
RESOLVED FIXED
10 years ago
9 years ago

People

(Reporter: O. Atsushi (Torisugari), Assigned: peterv)

Tracking

unspecified
mozilla1.9.1b1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
Bug 221335 changed the type of |txMozillaTextOutput::mDocument| and |txTransformNotifier::mDocument|
from nsIDOMDocument* to nsIDocument*.

> nsCOMPtr<nsIDocument> mDocument;

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/content/xslt/src/xslt/txMozillaXMLOutput.h&rev=1.34&mark=86#86

However, mDocument still QI to nsIDocument*.

> nsCOMPtr<nsIDocument> doc = do_QueryInterface(mDocument); 

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/content/xslt/src/xslt/txMozillaXMLOutput.cpp&rev=1.86&mark=273#273
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/content/xslt/src/xslt/txMozillaXMLOutput.cpp&rev=1.86&mark=804#804
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/content/xslt/src/xslt/txMozillaXMLOutput.cpp&rev=1.86&mark=1111#1111

If I understand right, these are meaningless, while they are harmless as well.

BTW, is it possible to detect such a code systematically?  I mean, for example, editing
QI's macro implementation to check if QI-destination is same as the original type...?
You are probably correct. If you attach a patch we can review it and check it in.
(Assignee)

Comment 2

9 years ago
Created attachment 337020 [details] [diff] [review]
v1
Assignee: nobody → peterv
Status: NEW → ASSIGNED
Attachment #337020 - Flags: superreview?(jonas)
Attachment #337020 - Flags: review?(jonas)
Attachment #337020 - Flags: superreview?(jonas)
Attachment #337020 - Flags: superreview+
Attachment #337020 - Flags: review?(jonas)
Attachment #337020 - Flags: review+
(Assignee)

Updated

9 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Priority: -- → P5
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
You need to log in before you can comment on or make changes to this bug.