Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
This commit is contained in:
@@ -1389,8 +1389,7 @@ TextControlState::TextControlState(TextControlElement* aOwningElement)
|
||||
TextControlState* TextControlState::Construct(
|
||||
TextControlElement* aOwningElement) {
|
||||
if (sReleasedInstances && !sReleasedInstances->IsEmpty()) {
|
||||
TextControlState* state = sReleasedInstances->LastElement();
|
||||
sReleasedInstances->RemoveLastElement();
|
||||
TextControlState* state = sReleasedInstances->PopLastElement();
|
||||
state->mTextCtrlElement = aOwningElement;
|
||||
state->mBoundFrame = nullptr;
|
||||
state->mSelectionProperties = SelectionProperties();
|
||||
|
||||
Reference in New Issue
Block a user