mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1388917 - Fix moving of SelectionState in PlaceholderTransaction's constructor; r=masayuki
This commit is contained in:
parent
38bfadf1a9
commit
3ab3b25fad
@ -677,6 +677,7 @@ EditorBase::DoTransaction(Selection* aSelection, nsITransaction* aTxn)
|
||||
if (mPlaceholderBatch && !mPlaceholderTransaction) {
|
||||
mPlaceholderTransaction =
|
||||
new PlaceholderTransaction(*this, mPlaceholderName, Move(mSelState));
|
||||
MOZ_ASSERT(mSelState.isNothing());
|
||||
|
||||
// We will recurse, but will not hit this case in the nested call
|
||||
DoTransaction(mPlaceholderTransaction);
|
||||
|
@ -24,9 +24,12 @@ PlaceholderTransaction::PlaceholderTransaction(
|
||||
, mForwarding(nullptr)
|
||||
, mCompositionTransaction(nullptr)
|
||||
, mCommitted(false)
|
||||
, mStartSel(Move(*aSelState))
|
||||
, mEditorBase(&aEditorBase)
|
||||
{
|
||||
// Make sure to move aSelState into a local variable to null out the original
|
||||
// Maybe<SelectionState> variable.
|
||||
Maybe<SelectionState> selState(Move(aSelState));
|
||||
mStartSel = *selState;
|
||||
mName = aName;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user