Last Comment Bug 699147 - Simplify length list parsing
: Simplify length list parsing
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: mozilla11
Assigned To: Robert Longson
:
: Jet Villegas (:jet)
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-02 10:51 PDT by Robert Longson
Modified: 2011-11-10 03:08 PST (History)
2 users (show)
longsonr: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (2.23 KB, patch)
2011-11-02 10:51 PDT, Robert Longson
jwatt: review+
Details | Diff | Splinter Review

Description Robert Longson 2011-11-02 10:51:57 PDT
Created attachment 571374 [details] [diff] [review]
patch

Avoid changing from utf16 to utf8 and back again.
Comment 1 Jonathan Watt [:jwatt] 2011-11-08 03:54:25 PST
Comment on attachment 571374 [details] [diff] [review]
patch

Change this line:

>+    temp.AppendItem(length);

to:

>-    if (!temp.AppendItem(length)) {
>-      return NS_ERROR_OUT_OF_MEMORY;
>-    }

since AppendItem is allocation fallible, and r=jwatt.
Comment 2 Robert Longson 2011-11-08 06:06:17 PST
I'll change the SVGNumberList parsing to return NS_ERROR_OUT_OF_MEMORY for appendItem then.
Comment 3 Jonathan Watt [:jwatt] 2011-11-08 06:15:45 PST
perfect, thanks!
Comment 5 Marco Bonardo [::mak] 2011-11-10 03:08:41 PST
https://hg.mozilla.org/mozilla-central/rev/c4c529e9a2d3

Note You need to log in before you can comment on or make changes to this bug.