mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1765172 - Only call UnbindFromFrame if BindToFrame succeeded. r=layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D146060
This commit is contained in:
parent
fe8840f811
commit
b608ad722d
@ -142,12 +142,10 @@ void nsTextControlFrame::DestroyFrom(nsIFrame* aDestructRoot,
|
||||
|
||||
// Unbind the text editor state object from the frame. The editor will live
|
||||
// on, but things like controllers will be released.
|
||||
RefPtr<TextControlElement> textControlElement =
|
||||
TextControlElement::FromNode(GetContent());
|
||||
RefPtr textControlElement = TextControlElement::FromNode(GetContent());
|
||||
MOZ_ASSERT(textControlElement);
|
||||
textControlElement->UnbindFromFrame(this);
|
||||
|
||||
if (mMutationObserver) {
|
||||
textControlElement->UnbindFromFrame(this);
|
||||
mRootNode->RemoveMutationObserver(mMutationObserver);
|
||||
mMutationObserver = nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user