Closed Bug 1571339 Opened 1 year ago Closed 5 months ago

Don't use nsTextFragment::AppendTo to get string in TextNodeContainsDOMWordSeparator

Categories

(Core :: Spelling checker, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

References

Details

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/0ffa9e372df56c95547fed9c3433ddec4fbf6f11/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp#629

Actually, spellchecker always allocate heap to get text from text node. But it is unnecessary to allocate another heap here since WordSplitState walks text only and it is stack class.

If text is in <textarea>, text node may be too large, so we shouldn't allocate memory to walk character in WordSplitState if possible. Because TextNodeContainsDOMWordSeparator will be called per input.

Actually, spellchecker always allocates the heap to get text from text node. But it is unnecessary to allocate another heap here since WordSplitState walks text only and it is stack class.

If text is in '<textarea>', text node may be too large, so we shouldn't allocate memory to walk character in WordSplitState if possible. Because TextNodeContainsDOMWordSeparator will be called per input.

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:m_kato, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(m_kato)
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/b3cd91c124cc
Don't use nsTextFragment::AppendTo to get string in TextNodeContainsDOMWordSeparator. r=masayuki
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Assignee: nobody → m_kato
Flags: needinfo?(m_kato)
Regressions: 1602526
You need to log in before you can comment on or make changes to this bug.