Closed Bug 443902 Opened 14 years ago Closed 14 years ago

Remove some nsIDocument QIs from txMozillaTextOutput.cpp

Categories

(Core :: XSLT, defect, P5)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9.1b1

People

(Reporter: torisugari, Assigned: peterv)

Details

Attachments

(1 file)

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.
Attached patch v1Splinter Review
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+
Status: ASSIGNED → RESOLVED
Closed: 14 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.