Closed Bug 555321 Opened 14 years ago Closed 14 years ago

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

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a4

People

(Reporter: dholbert, Assigned: dholbert)

References

()

Details

Attachments

(1 file)

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.
Attached patch fix v1Splinter Review
Attachment #435293 - Flags: review?(jwatt)
Attachment #435293 - Flags: review?(jwatt) → review+
Landed: http://hg.mozilla.org/mozilla-central/rev/820e71d2fc2e
Status: ASSIGNED → RESOLVED
Closed: 14 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.

Attachment

General

Created:
Updated:
Size: