Closed
Bug 329848
Opened 19 years ago
Closed 18 years ago
ASSERTION: transform-attribute parse error
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: longsonr)
References
Details
(Keywords: assertion, testcase)
Attachments
(5 files, 2 obsolete files)
115 bytes,
image/svg+xml
|
Details | |
1.73 KB,
text/plain
|
bzbarsky
:
review+
tor
:
superreview+
|
Details |
10.02 KB,
patch
|
bzbarsky
:
review+
tor
:
superreview+
|
Details | Diff | Splinter Review |
1.37 KB,
patch
|
tor
:
review+
tor
:
superreview+
|
Details | Diff | Splinter Review |
1.76 KB,
patch
|
tor
:
review+
tor
:
superreview+
|
Details | Diff | Splinter Review |
###!!! ASSERTION: transform-attribute parse error: 'Error', file /Users/admin/trunk/mozilla/content/svg/content/src/nsSVGTransformList.cpp, line 246
I think this is just a bogus assertion.
Reporter | ||
Comment 1•19 years ago
|
||
Comment 2•19 years ago
|
||
Yeah, this is yet another case where we should be sending a message to the js console instead of asserting.
Assignee | ||
Comment 3•18 years ago
|
||
I was planning to get tor to sr this, do I need to get anyone else to review it?
Assignee | ||
Comment 4•18 years ago
|
||
Attachment #230614 -
Flags: review?(bzbarsky)
Comment 5•18 years ago
|
||
Comment on attachment 230612 [details] [diff] [review]
patch
>Index: content/base/public/nsContentUtils.h
>Index: content/base/src/nsContentUtils.cpp
>+ "chrome://global/locale/svg/svg.properties",
That trailing comma will break builds. Remove it.
Does this need to be in #ifdef MOZ_SVG?
>Index: content/svg/content/src/nsSVGElement.cpp
>+ nsAutoString attributeName, attributeValue(aValue);
Why is attributeValue an nsAutoString? Please use PromiseFlatString() as needed if you need a flat string from an nsAString.
>+ nsSVGUtils::ReportToConsole(GetCurrentDoc(),
Why the current doc and not the owner doc? That looks wrong.
>Index: dom/locales/jar.mn
>+ locale/@AB_CD@/global/svg/svg.properties (%chrome/svg/svg.properties)
Again, should this be ifdefed?
Attachment #230612 -
Flags: review?(bzbarsky) → review-
Updated•18 years ago
|
Attachment #230614 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 6•18 years ago
|
||
> (From update of attachment 230612 [details] [diff] [review] [edit])
> >Index: content/base/public/nsContentUtils.h
> >Index: content/base/src/nsContentUtils.cpp
> >+ "chrome://global/locale/svg/svg.properties",
> That trailing comma will break builds. Remove it.
> Does this need to be in #ifdef MOZ_SVG?
Added #ifdef MOZ_SVG and moved property up so that it always requires a comma.
> >Index: content/svg/content/src/nsSVGElement.cpp
> >+ nsAutoString attributeName, attributeValue(aValue);
> Why is attributeValue an nsAutoString? Please use PromiseFlatString() as
> needed if you need a flat string from an nsAString.
Done.
> >+ nsSVGUtils::ReportToConsole(GetCurrentDoc(),
> Why the current doc and not the owner doc? That looks wrong.
Changed. When would you use GetCurrentDoc over GetOwnerDoc?
> >Index: dom/locales/jar.mn
> >+ locale/@AB_CD@/global/svg/svg.properties (%chrome/svg/svg.properties)
> Again, should this be ifdefed?
Changed, didn't realise you could do that.
Attachment #230612 -
Attachment is obsolete: true
Attachment #230721 -
Flags: review?(bzbarsky)
Comment 7•18 years ago
|
||
Comment on attachment 230721 [details] [diff] [review]
address review comments
>Index: content/svg/content/src/nsSVGElement.cpp
>+ const PRUnichar *strings[] = { attributeName.get(), PromiseFlatString(aValue).get() };
After this line, that pointer is pointing at the innards of an object that's gone. So if aValue is not already flat, you will generally crash.
You need to keep the object alive:
const nsAFlatString& flatValue = PromiseFlatString(aValue);
then use flatValue.get(). Or something along those lines.
>Index: dom/locales/jar.mn
>+#ifdef MOZ_SVG
>+ locale/@AB_CD@/global/svg/svg.properties (%chrome/svg/svg.properties)
>+#endif
And you did check that this works (that is, that this file is preprocessed), right?
In general, GetOwnerDoc() is the same as the DOM's ownerDocument. GetCurrentDoc() is the document the node is being rendered in (e.g. null for nodes that are not inserted into a document).
Attachment #230721 -
Flags: review?(bzbarsky) → review-
Assignee | ||
Comment 8•18 years ago
|
||
> (From update of attachment 230721 [details] [diff] [review] [edit])
> >Index: content/svg/content/src/nsSVGElement.cpp
> >+ const PRUnichar *strings[] = { attributeName.get(), PromiseFlatString(aValue).get() };
> After this line, that pointer is pointing at the innards of an object that's
> gone. So if aValue is not already flat, you will generally crash.
> You need to keep the object alive:
> const nsAFlatString& flatValue = PromiseFlatString(aValue);
> then use flatValue.get(). Or something along those lines.
Done.
> >Index: dom/locales/jar.mn
> >+#ifdef MOZ_SVG
> >+ locale/@AB_CD@/global/svg/svg.properties (%chrome/svg/svg.properties)
> >+#endif
> And you did check that this works (that is, that this file is preprocessed),
right?
I checked that this was the correct syntax by looking at other jar.mn files. I then rebuilt the whole browser and checked that the testcase still caused my new warning message to be displayed in the Error Console. Is there any other testing you would recommend?
After reading your response I also checked that the svg.properties file was in en-US.jar and that the date of en-US.jar was later than that of the jar.mn file that I changed.
Attachment #230721 -
Attachment is obsolete: true
Attachment #230747 -
Flags: review?(bzbarsky)
Comment 9•18 years ago
|
||
Comment on attachment 230747 [details] [diff] [review]
address additional review comments
r=bzbarsky
Attachment #230747 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Updated•18 years ago
|
Attachment #230747 -
Flags: superreview?(tor)
Assignee | ||
Updated•18 years ago
|
Attachment #230614 -
Flags: superreview?(tor)
Attachment #230614 -
Flags: superreview?(tor) → superreview+
Attachment #230747 -
Flags: superreview?(tor) → superreview+
Assignee | ||
Comment 10•18 years ago
|
||
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 11•18 years ago
|
||
This checkin seems to have screwed things up on various port builds "nsSVGElement.cpp", line 226: Error: ReportToConsole is not a member of nsSVGUtils
I have commented out the offending call temporarily while I try to determine what is wrong.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 12•18 years ago
|
||
Is it OK to try this again now?
Attachment #230898 -
Flags: superreview?(tor)
Attachment #230898 -
Flags: review?(tor)
Attachment #230898 -
Flags: superreview?(tor)
Attachment #230898 -
Flags: superreview+
Attachment #230898 -
Flags: review?(tor)
Attachment #230898 -
Flags: review+
Assignee | ||
Comment 13•18 years ago
|
||
additional spaces after MOZ_SVG causes a warning in the build log. Removing the bogus spaces fixes it.
Attachment #231089 -
Flags: superreview?(tor)
Attachment #231089 -
Flags: review?(tor)
Attachment #231089 -
Flags: superreview?(tor)
Attachment #231089 -
Flags: superreview+
Attachment #231089 -
Flags: review?(tor)
Attachment #231089 -
Flags: review+
Assignee | ||
Comment 14•18 years ago
|
||
Comment on attachment 231089 [details] [diff] [review]
fix build warning
Checked in fix for build warning.
Assignee | ||
Comment 15•18 years ago
|
||
checked in fix to restore functionality. Fortunately blackdeath was OK with it this time.
Status: REOPENED → RESOLVED
Closed: 18 years ago → 18 years ago
Resolution: --- → FIXED
Comment 16•18 years ago
|
||
*** Bug 322528 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•