Closed
Bug 1653485
Opened 4 years ago
Closed 4 years ago
Avoid unnecessary copy of stack only classes
Categories
(Core :: DOM: Editor, defect, P2)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
mozilla80
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(3 files)
In WSRunObject.cpp, TextFragmentData
is copied even when it's safe to refer with const-reference. We should stop it.
Assignee | ||
Updated•4 years ago
|
Severity: -- → S3
Priority: -- → P2
Assignee | ||
Comment 1•4 years ago
|
||
They return copy of cached EditorDOMRange
instance. So, they can return
const-reference rather than copy of stored data.
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D83919
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D83920
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/9dfd625107a4 part 1: Make `TextFragmentData::GetInvisibleLeadingWhiteSpaceRange()` and `TextFragmentData::GetInvisibleTrailingWhiteSpaceRange()` return const-reference r=m_kato https://hg.mozilla.org/integration/autoland/rev/e1b6c060290a part 2: Change each lvalue which is initialized with result of `*Ref()` methods in `WSRunObject.cpp` to `const Foo&` r=m_kato https://hg.mozilla.org/integration/autoland/rev/78186a074f2f part 3: Rename `WSRunScanner::TextFragmentDataAtStart()` to `WSRunScanner::TextFragmentDataAtStartRef()` r=m_kato
Comment 5•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9dfd625107a4
https://hg.mozilla.org/mozilla-central/rev/e1b6c060290a
https://hg.mozilla.org/mozilla-central/rev/78186a074f2f
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
status-firefox80:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in
before you can comment on or make changes to this bug.
Description
•