Closed Bug 306741 Opened 19 years ago Closed 19 years ago

Calls will abort at runtime in nsStyleContext::DumpRegressionData

Categories

(Core :: CSS Parsing and Computation, defect, P2)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.8beta4

People

(Reporter: Biesinger, Assigned: dbaron)

References

()

Details

(Keywords: fixed1.8, Whiteboard: [patch])

Attachments

(1 file, 1 obsolete file)

898     fprintf(out,
899             "%f%c",
900             svg->mStrokeDasharray[i],
901             (i == svg->mStrokeDasharrayLength) ? ' ' : ',');

../../../../mozilla/layout/style/nsStyleContext.cpp: In member function »void
nsStyleContext::DumpRegressionData(nsPresContext*, FILE*, PRInt32)«:
../../../../mozilla/layout/style/nsStyleContext.cpp:901: Warnung: Objekte des
Nicht-POD-Typs »class nsStyleCoord« können nicht über »...« übergeben werden;
Aufruf wird zur Laufzeit abbrechen
../../../../mozilla/layout/style/nsStyleContext.cpp:901: Warnung: format »%f«
erwartet Typ »double«, aber Argument 3 hat Typ »int«

translation: "Can't pass non-POD type nsStyleCoord through ..., call will abort
at runtime"
"%f expects double, but argument 3 is of type int"

(Sorry about the german messages)

And:
903   fprintf(out, "%f %f %f %f %f %d %d %d %d %d %d %d %d %d\" />\n",
904           svg->mFillOpacity,
905           svg->mStrokeDashoffset,
906           svg->mStrokeMiterlimit,
907           svg->mStrokeOpacity,
908           svg->mStrokeWidth,
909           (int)svg->mStrokeDasharrayLength,
910           (int)svg->mClipRule,
911           (int)svg->mFillRule,
912           (int)svg->mPointerEvents,
913           (int)svg->mShapeRendering,
914           (int)svg->mStrokeLinecap,
915           (int)svg->mStrokeLinejoin,
916           (int)svg->mTextAnchor,
917           (int)svg->mTextRendering);

../../../../mozilla/layout/style/nsStyleContext.cpp:917: Warnung: Objekte des
Nicht-POD-Typs »const class nsStyleCoord« können nicht über »...« übergeben
werden; Aufruf wird zur Laufzeit abbrechen
../../../../mozilla/layout/style/nsStyleContext.cpp:917: Warnung: Objekte des
Nicht-POD-Typs »const class nsStyleCoord« können nicht über »...« übergeben
werden; Aufruf wird zur Laufzeit abbrechen
../../../../mozilla/layout/style/nsStyleContext.cpp:917: Warnung: format »%f«
erwartet Typ »double«, aber Argument 4 hat Typ »int«
../../../../mozilla/layout/style/nsStyleContext.cpp:917: Warnung: format »%f«
erwartet Typ »double«, aber Argument 7 hat Typ »int«
Yeah, I have nasty comments about this in my tree; I may have commented
somewhere when it landed.  It's mStrokeDasharray[i], mStrokeDashoffset, and
mStrokeWidth that are |nsStyleCoord|s.  They need ToString.
Attached patch patch (obsolete) — Splinter Review
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [patch]
Target Milestone: --- → mozilla1.8beta4
Comment on attachment 194607 [details] [diff] [review]
patch


>--- nsStyleContext.cpp	20 Jul 2005 12:03:15 -0000	3.261
>+++ nsStyleContext.cpp	2 Sep 2005 00:17:02 -0000
>-  for (PRUint32 i = 0; i < svg->mStrokeDasharrayLength; i++)
>+  for (PRUint32 i = 0; i < svg->mStrokeDasharrayLength; i++) {
>+    outline->mOutlineWidth.ToString(str);

Shouldn't this be svg->mStrokeDasharry[i].ToString(str) or similar?

>     fprintf(out,
>-            "%f%c",
>-            svg->mStrokeDasharray[i],
>+            "%s%c",
>+            NS_ConvertUCS2toUTF8(str).get(),
>             (i == svg->mStrokeDasharrayLength) ? ' ' : ',');
>+  }
Attachment #194607 - Flags: review?(tor) → review-
Attached patch patchSplinter Review
Attachment #194607 - Attachment is obsolete: true
Attachment #194670 - Flags: superreview?(tor)
Attachment #194670 - Flags: review?(cbiesinger)
Attachment #194670 - Flags: review?(cbiesinger) → review+
although I'd use UTF16 rather than UCS2
Attachment #194670 - Flags: superreview?(tor) → superreview+
Comment on attachment 194670 [details] [diff] [review]
patch

DEBUG-only code that we might want fixed on the branch for running regression
tests
Attachment #194670 - Flags: approval1.8b4?
Comment on attachment 194670 [details] [diff] [review]
patch

I'm going to take the liberty of approving this since it is:

Debug only code that should not have any impact on the behavior our users will
see.

Please get this checked in ASAP though.
Attachment #194670 - Flags: approval1.8b4? → approval1.8b4+
Fix checked in to trunk, 2005-09-06 10:07 -0700.
Fix checked in to MOZILLA_1_8_BRANCH, 2005-09-06 10:08 -0700.

Conversion suggested in comment 5, for entire function, checked in to trunk
only, 2005-09-06 10:09 -0700.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: