Closed Bug 1477898 Opened Last year Closed Last year

Stop calling EditorBase::SetFlags() from nsTextEditorState as far as possible

Categories

(Core :: Editor, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

EditorBase::SetFlags() usually appears when I test attachment 8848015 [details]. However, it does nothing while the test. So, it must be caused by the cost of virtual calls even though nsTextEditorState never handles HTMLEditor (HTMLEditor is the only one which overrides EditorBase::SetFlags()).

Fortunately, EditorBase::Flags() must be an inline method. So, nsTextEditorState can check if it should call SetFlags().
Comment on attachment 8994391 [details]
Bug 1477898 - Make AutoRestoreEditorState not call EditorBase::SetFlags() since the virtual call cost appears in profile

https://reviewboard.mozilla.org/r/258958/#review266240
Attachment #8994391 - Flags: review?(m_kato) → review+
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/4d3ed6d8b874
Make AutoRestoreEditorState not call EditorBase::SetFlags() since the virtual call cost appears in profile r=m_kato
https://hg.mozilla.org/mozilla-central/rev/4d3ed6d8b874
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.