Closed Bug 1653485 Opened 2 months ago Closed 2 months ago

Avoid unnecessary copy of stack only classes

Categories

(Core :: DOM: Editor, defect, P2)

defect

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.

Severity: -- → S3
Priority: -- → P2
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
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
No longer regressions: 1654585
You need to log in before you can comment on or make changes to this bug.