Closed
Bug 1484143
Opened 6 years ago
Closed 6 years ago
StringBuilder::ToString should use fallible appends
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
INVALID
People
(Reporter: hsivonen, Assigned: hsivonen)
Details
StringBuilder::ToString assumes that appends can't fail after a fallible SetCapacity. However, entity-encoding expands the length in a way that's not taken into account in the SetCapacity call, so any of the appends could fail if the expansion necessitates a larger jemalloc bucket.
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•6 years ago
|
||
Additionally, this code runs on a performance-sensitive path (innerHTML getter), but it makes the string implementation do a frightening amount of work on a per-code unit basis. I'm going to try rewriting this in terms of BulkWrite.
Assignee | ||
Comment 2•6 years ago
|
||
The initial bug report here is wrong. There's still opportunity for per improvement. Filed a new bug for that: bug 1488697.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Summary: StringBuilder::ToString should use fallible appends → StringBuilder::ToString should use BulkWrite
Assignee | ||
Updated•6 years ago
|
Summary: StringBuilder::ToString should use BulkWrite → StringBuilder::ToString should use fallible appends
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•