Fix spurious WARNING: wrong frame type: file nsSVGSVGElement.cpp, line 1103

RESOLVED FIXED in mozilla1.9.3a4

Status

()

Core
SVG
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

Trunk
mozilla1.9.3a4
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
The following chunk of code triggers many spurious warnings in debug builds:
1091 void
1092 nsSVGSVGElement::InvalidateTransformNotifyFrame()
1093 {
1094   nsISVGSVGFrame* svgframe = do_QueryFrame(GetPrimaryFrame());
1095   if (svgframe) {
1096     svgframe->NotifyViewportChange();
1097   }
1098 #ifdef DEBUG
1099   else {
1100     // XXX we get here during nsSVGOuterSVGFrame::Init() since that
1101     // function is called before the presshell association between us
1102     // and our frame is established.
1103     NS_WARNING("wrong frame type");
1104   }
http://mxr.mozilla.org/mozilla-central/source/content/svg/content/src/nsSVGSVGElement.cpp#1091

I get this warning e.g. when loading
 http://www.w3.org/TR/SVG/images/animate/animMotion01.svg

Note the XXX comment in the code there -- it's saying we'll (incorrectly) warn whenever GetPrimaryFrame() returns null, which can happen during initialization.

We really shouldn't be warning if GetPrimaryFrame()'s return-value is null.  Patch coming up.
(Assignee)

Comment 1

8 years ago
Created attachment 435293 [details] [diff] [review]
fix v1
Attachment #435293 - Flags: review?(jwatt)
Attachment #435293 - Flags: review?(jwatt) → review+
(Assignee)

Comment 2

8 years ago
Landed: http://hg.mozilla.org/mozilla-central/rev/820e71d2fc2e
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a4
You need to log in before you can comment on or make changes to this bug.