Closed
Bug 1682006
Opened 5 years ago
Closed 5 years ago
Don't call Truncate() on the return string in GetPropertyValue.
Categories
(Core :: DOM: CSS Object Model, defect, P2)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
FIXED
85 Branch
Tracking | Status | |
---|---|---|
firefox85 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
Details
Attachments
(2 files)
Instead, assert it's empty.
Assignee | ||
Comment 1•5 years ago
|
||
Turns out this causes a bit of overhead when appending to an AutoString,
because Truncate() calls SetToEmptyBuffer(), which makes it go from
inline-string to buffer string, and next time we append we need to turn
the string from a buffer-based string to an inline string again, which
is some minor, but measurable, work, while profiling some
micro-benchmarks.
Probably we should make Truncate() a no-op for a zero-length string, but
I'll send that separately.
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D99493
Assignee | ||
Updated•5 years ago
|
Severity: -- → N/A
Priority: -- → P2
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2809cb024474
Don't call Truncate() on the return string in GetPropertyValue. r=xidorn
https://hg.mozilla.org/integration/autoland/rev/ca95578df71a
Avoid silly propID -> string -> propID conversion in nsComputedDOMStyle. r=xidorn
Comment 4•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2809cb024474
https://hg.mozilla.org/mozilla-central/rev/ca95578df71a
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox85:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•