Bug 1753508 - Add logger of selection batch r=smaug

This was required for debugging the bug.

Differential Revision: https://phabricator.services.mozilla.com/D139350
This commit is contained in:
Masayuki Nakano
2022-03-11 02:24:24 +00:00
parent 115782934b
commit 22aa786ab3
20 changed files with 351 additions and 211 deletions

View File

@@ -2334,7 +2334,8 @@ void TextControlState::SetRangeText(const nsAString& aReplacement,
Selection* selection =
mSelCon ? mSelCon->GetSelection(SelectionType::eNormal) : nullptr;
SelectionBatcher selectionBatcher(
selection, nsISelectionListener::JS_REASON); // no-op if nullptr
selection, __FUNCTION__,
nsISelectionListener::JS_REASON); // no-op if nullptr
MOZ_ASSERT(aStart <= aEnd);
value.Replace(aStart, aEnd - aStart, aReplacement);
@@ -2787,7 +2788,7 @@ bool TextControlState::SetValueWithTextEditor(
// FYI: It's safe to use raw pointer for selection here because
// SelectionBatcher will grab it with RefPtr.
Selection* selection = mSelCon->GetSelection(SelectionType::eNormal);
SelectionBatcher selectionBatcher(selection);
SelectionBatcher selectionBatcher(selection, __FUNCTION__);
// get the flags, remove readonly, disabled and max-length,
// set the value, restore flags