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

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: Fix unit test and adjust comments. Created 4 years, 11 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..4dda878fed1a4848d156c2c7c9cbd2608f99ceb7 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)
Nate Chapin 2016/02/03 23:25:14 Do we have to have constructors for both a pointer
dcheng 2016/02/03 23:33:31 A pre-Oilpan alternative is to just keep the refer
: 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;
« 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