Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(436)

Unified Diff: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h

Issue 1659013003: Don't reset LoadEventProgress if frame unload has already started. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more disabler Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h
index 6423d5ad6b2477f8b6b3c67b064cb87a6b814362..eb38835c4c9b085469eaedd10bca3cd7bedc0a1e 100644
--- a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h
@@ -109,21 +109,25 @@ DEFINE_ELEMENT_TYPE_CASTS(HTMLFrameOwnerElement, isFrameOwnerElement());
class SubframeLoadingDisabler {
STACK_ALLOCATED();
public:
- explicit SubframeLoadingDisabler(Node& root)
+ explicit SubframeLoadingDisabler(Node& root) : SubframeLoadingDisabler(&root)
+ {
+ }
+
+ explicit SubframeLoadingDisabler(Node* root)
: m_root(root)
{
- disabledSubtreeRoots().add(m_root);
+ if (m_root)
+ disabledSubtreeRoots().add(m_root);
}
~SubframeLoadingDisabler()
{
- disabledSubtreeRoots().remove(m_root);
+ if (m_root)
+ disabledSubtreeRoots().remove(m_root);
}
static bool canLoadFrame(HTMLFrameOwnerElement& owner)
{
- if (owner.document().unloadStarted())
- return false;
for (Node* node = &owner; node; node = node->parentOrShadowHostNode()) {
if (disabledSubtreeRoots().contains(node))
return false;
@@ -132,7 +136,7 @@ public:
}
private:
- static WillBeHeapHashCountedSet<RawPtrWillBeMember<Node>>& disabledSubtreeRoots();
+ CORE_EXPORT static WillBeHeapHashCountedSet<RawPtrWillBeMember<Node>>& disabledSubtreeRoots();
RawPtrWillBeMember<Node> m_root;
};
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698