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

code level bug : missing do_QueryInterface() ?

RESOLVED FIXED

Status

()

Core
Layout
RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: Bernard Alleysson, Assigned: Bernard Alleysson)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Assignee)

Description

13 years ago
assigning according to cvsblame (patch bug 255337)

Found by code inspection. It seems that do_GetInterface() was lost. Here is the
patch:

Index: html/style/src/nsCSSRendering.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/html/style/src/nsCSSRendering.cpp,v
retrieving revision 3.252
diff -u -8 -p -r3.252 nsCSSRendering.cpp
--- html/style/src/nsCSSRendering.cpp	11 Oct 2004 16:29:42 -0000	3.252
+++ html/style/src/nsCSSRendering.cpp	18 Oct 2004 23:52:36 -0000
@@ -2636,17 +2636,17 @@ FindElementBackground(nsPresContext* aPr
   if (!parentFrame)
     return PR_TRUE; // no parent to look at
 
   if (content->Tag() != nsHTMLAtoms::body)
     return PR_TRUE; // not frame for <BODY> element
 
   // We should only look at the <html> background if we're in an HTML document
   nsIDocument* document = content->GetOwnerDoc();
-  nsCOMPtr<nsIDOMHTMLDocument> htmlDoc(document);
+  nsCOMPtr<nsIDOMHTMLDocument> htmlDoc = do_QueryInterface(document);
   if (!htmlDoc)
     return PR_TRUE;
 
   if (document->IsCaseSensitive()) // XHTML, not HTML
     return PR_TRUE;
   
   const nsStyleBackground* htmlBG = parentFrame->GetStyleBackground();
   return !htmlBG->IsTransparent();
(Assignee)

Comment 1

13 years ago
oops, please replace do_GetInterface() by do_QueryInterface
Summary: code level bug : missing do_GetInterface() ? → code level bug : missing do_QueryInterface() ?
Created attachment 162529 [details] [diff] [review]
Bernard's patch

In general, it's easier to work with patches when they're attached to bugs...
;)
Comment on attachment 162529 [details] [diff] [review]
Bernard's patch

r+sr=bzbarsky.	I do rather wonder how this compiled...
Attachment #162529 - Flags: superreview+
Attachment #162529 - Flags: review+
To patch author.  ;)
Assignee: bzbarsky → balleysson
Checked in on the trunk.  Thanks for catching this, Bernard!
Status: NEW → RESOLVED
Last Resolved: 13 years ago
OS: Windows Server 2003 → All
Hardware: PC → All
Resolution: --- → FIXED
(In reply to comment #3)
> I do rather wonder how this compiled...

due to bug 253941
You need to log in before you can comment on or make changes to this bug.