| 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)
|
| : 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;
|
|
|