Commit 45ee42b3 authored by Jeremy Roman's avatar Jeremy Roman Committed by Commit Bot

HTMLPortalElement::DisconnectContentFrame and RemovedFrom redundantly clear the portal remote.

Do it in the former (which runs earlier) and merely DCHECK in the latter.

Change-Id: I53c0a8a64ec4f2b909de6dd710167d3f8e8aefac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1769522Reviewed-by: default avatarLucas Gadani <lfg@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#690160}
parent e46fb41d
...@@ -378,13 +378,8 @@ HTMLPortalElement::InsertionNotificationRequest HTMLPortalElement::InsertedInto( ...@@ -378,13 +378,8 @@ HTMLPortalElement::InsertionNotificationRequest HTMLPortalElement::InsertedInto(
} }
void HTMLPortalElement::RemovedFrom(ContainerNode& node) { void HTMLPortalElement::RemovedFrom(ContainerNode& node) {
DCHECK(!remote_portal_.is_bound());
HTMLFrameOwnerElement::RemovedFrom(node); HTMLFrameOwnerElement::RemovedFrom(node);
Document& document = GetDocument();
if (node.IsInDocumentTree() && document.IsHTMLDocument()) {
ConsumePortal();
}
} }
bool HTMLPortalElement::IsURLAttribute(const Attribute& attribute) const { bool HTMLPortalElement::IsURLAttribute(const Attribute& attribute) const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment