Closed Bug 322528 Opened 19 years ago Closed 18 years ago

SVG shouldn't assert things about the state of the Web

Categories

(Core :: SVG, defect)

defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 329848

People

(Reporter: bzbarsky, Unassigned)

Details

Attachments

(1 file)

STEPS TO REPRODUCE: Load attached testcase in a debug build

EXPECTED RESULTS:  No asserts due to bogus attribute value in web content:

ACTUAL RESULTS:

###!!! ASSERTION: transform-attribute parse error: 'Error', file ../../../../../mozilla/content/svg/content/src/nsSVGTransformList.cpp, line 246

The testcase was reduced from http://www.croczilla.com/svg/samples/xulsvg1/xulsvg1.xul where the bogus attr value is needed for a XUL template.  But in any case, we shouldn't be asserting here; this makes my assertions-are-fatal build die on simple (and even sorta valid, when all's said and done) Web content.
Flags: blocking1.9a1?
Attached image Testcase
I completely agree. I've opened bugs to get rid of these before by changing them to warnings or something. I guess what we really want is to report the error in the JavaScript Console (hmm, I should open that bug about renaming it to the "Developer Console"). biesi or someone else was going to do that for something in SVG land, and I was waiting to see how it was done before making a sweep of our code to fix up all the other locations. I know, I'm lazy.
See nsContentUtils::ReportToConsole if you want to report stuff to the console.

But note that in this case you'd report an error even though the page author is doing exactly what he wants to be doing...
if that was me, then I completely forgot about it... have a bug#?
biesi: sorry I got mixed up, it was bsmedberg. There was no bug number BTW, it was just an IRC conversation.
Bug 329848 removes the assert and replaces it with a write to the Error Console as per comment 2. 

I don't know whether its best to mark this as a duplicate even though it came first or to leave it open for the purpose of implementing some kind of override to  not prevent logging when processing valid XUL templates. I'm not sure how you'd implement that either.

*** This bug has been marked as a duplicate of 329848 ***
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
As for not reporting to console on what's a valid XUL template attr value... that's up to you guys.  If this is a common use case, we'll need something; if this is very rare, I think we're ok.
Flags: blocking1.9a1?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: