Bug 1343642 - Ensure to grab nsFrameSelection before calling its methods unless calling only const methods. r=smaug

MozReview-Commit-ID: 9GKujCcrhly
This commit is contained in:
Masayuki Nakano
2017-04-06 13:11:52 +09:00
parent 6f0b972d6c
commit 1922827ae6
3 changed files with 98 additions and 63 deletions

View File

@@ -3592,7 +3592,7 @@ HTMLInputElement::Select()
nsTextEditorState* tes = GetEditorState();
if (tes) {
nsFrameSelection* fs = tes->GetConstFrameSelection();
RefPtr<nsFrameSelection> fs = tes->GetConstFrameSelection();
if (fs && fs->MouseDownRecorded()) {
// This means that we're being called while the frame selection has a mouse
// down event recorded to adjust the caret during the mouse up event.