Closed Bug 539697 Opened 14 years ago Closed 14 years ago

Return the correct failure code if we can't parse something in a script

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: longsonr, Assigned: longsonr)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
return the correct failure code if we can't parse something
OS: Windows Vista → All
Hardware: x86 → All
Attachment #421633 - Attachment is patch: true
Attachment #421633 - Flags: review?(jwatt)
Attachment #421633 - Flags: review?(jwatt) → review+
For the record, the 2nd edition of SVG 1.1 made this change. See for example:

http://dev.w3.org/SVG/profiles/1.1F2/publish/types.html#__svg__SVGLength__valueAsString
This patch is wrong then. *sigh*
Attached patch updated patchSplinter Review
Wrong units are NOT_SUPPORTED_ERR rather than a SYNTAX_ERR
Assignee: nobody → longsonr
Attachment #421633 - Attachment is obsolete: true
Attachment #421646 - Flags: review?(jwatt)
Summary: Return the correct failure code if we can't parse something → Return the correct failure code if we can't parse something in a script
Attachment #421646 - Flags: review?(jwatt) → review+
Bugzilla won't give me a good interdiff, but your second patch is 19 KB vs the 36 KB of your first patch. I presume you purposely dropped some changes as well as changing some SYNTAX_ERR returns to NOT_SUPPORTED_ERR.
I purposely dropped some changes that were not necessary. I only want to change things that are called by script and not things that are called by the parser as they fall in the "If it ain't broke don't fix it category"
Makes sense. Just double checking you hadn't unintentionally lost some of your changes. :)
Getting some build errors on OSX:
/Users/altape/moz/mozilla-central/content/svg/content/src/nsSVGAngle.cpp: In member function ‘virtual nsresult DOMSVGAngle::NewValueSpecifiedUnits(PRUint16, float)’:
/Users/altape/moz/mozilla-central/content/svg/content/src/nsSVGAngle.cpp:79: error: void value not ignored as it ought to be
/Users/altape/moz/mozilla-central/content/svg/content/src/nsSVGAngle.cpp: In member function ‘virtual nsresult DOMSVGAngle::ConvertToSpecifiedUnits(PRUint16)’:
/Users/altape/moz/mozilla-central/content/svg/content/src/nsSVGAngle.cpp:83: error: void value not ignored as it ought to be
/Users/altape/moz/mozilla-central/content/svg/content/src/nsSVGAngle.cpp: At global scope:
/Users/altape/moz/mozilla-central/content/svg/content/src/nsSVGAngle.cpp:247: error: prototype for ‘nsresult nsSVGAngle::ConvertToSpecifiedUnits(PRUint16, nsSVGElement*)’ does not match any in class ‘nsSVGAngle’
/Users/altape/moz/mozilla-central/content/svg/content/src/nsSVGAngle.h:90: error: candidate is: void nsSVGAngle::ConvertToSpecifiedUnits(PRUint16, nsSVGElement*)
/Users/altape/moz/mozilla-central/content/svg/content/src/nsSVGAngle.cpp:247: error: ‘nsresult nsSVGAngle::ConvertToSpecifiedUnits(PRUint16, nsSVGElement*)’ cannot be overloaded
/Users/altape/moz/mozilla-central/content/svg/content/src/nsSVGAngle.h:90: error: with ‘void nsSVGAngle::ConvertToSpecifiedUnits(PRUint16, nsSVGElement*)’
/Users/altape/moz/mozilla-central/content/svg/content/src/nsSVGAngle.cpp:261: error: prototype for ‘nsresult nsSVGAngle::NewValueSpecifiedUnits(PRUint16, float, nsSVGElement*)’ does not match any in class ‘nsSVGAngle’
/Users/altape/moz/mozilla-central/content/svg/content/src/nsSVGAngle.h:89: error: candidate is: void nsSVGAngle::NewValueSpecifiedUnits(PRUint16, float, nsSVGElement*)
/Users/altape/moz/mozilla-central/content/svg/content/src/nsSVGAngle.cpp:261: error: ‘nsresult nsSVGAngle::NewValueSpecifiedUnits(PRUint16, float, nsSVGElement*)’ cannot be overloaded
/Users/altape/moz/mozilla-central/content/svg/content/src/nsSVGAngle.h:89: error: with ‘void nsSVGAngle::NewValueSpecifiedUnits(PRUint16, float, nsSVGElement*)’

It looks like some of the header files weren't updated?
Looks like Thunderbird is on fire. http://tinderbox.mozilla.org/showlog.cgi?log=Thunderbird/1264017916.1264018131.4535.gz Firefox will probably follow soon. Backout?
Give me 2 minutes and I'll fix it.
Fix pushed with missing header files.
Fix seems to have worked
pushed http://hg.mozilla.org/mozilla-central/rev/73ba1f723e0b and http://hg.mozilla.org/mozilla-central/rev/76a717c52203
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: