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

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

Issue 53303002: Have HTMLFrameOwnerElement / SubframeLoadingDisabler deal with references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tiny fix Created 7 years, 2 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
« no previous file with comments | « Source/core/html/HTMLFrameElementBase.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFrameOwnerElement.h
diff --git a/Source/core/html/HTMLFrameOwnerElement.h b/Source/core/html/HTMLFrameOwnerElement.h
index 2e7c9186914aaed7a24863cdd163eebcd1f0394b..834ac123c70af030eaf94926ddb244fb900c836b 100644
--- a/Source/core/html/HTMLFrameOwnerElement.h
+++ b/Source/core/html/HTMLFrameOwnerElement.h
@@ -40,7 +40,7 @@ public:
DOMWindow* contentWindow() const;
Document* contentDocument() const;
- void setContentFrame(Frame*);
+ void setContentFrame(Frame&);
void clearContentFrame();
void disconnectContentFrame();
@@ -81,20 +81,20 @@ DEFINE_NODE_TYPE_CASTS(HTMLFrameOwnerElement, isFrameOwnerElement());
class SubframeLoadingDisabler {
public:
- explicit SubframeLoadingDisabler(Node* root)
+ explicit SubframeLoadingDisabler(Node& root)
: m_root(root)
{
- disabledSubtreeRoots().add(m_root);
+ disabledSubtreeRoots().add(&m_root);
}
~SubframeLoadingDisabler()
{
- disabledSubtreeRoots().remove(m_root);
+ disabledSubtreeRoots().remove(&m_root);
}
- static bool canLoadFrame(HTMLFrameOwnerElement* owner)
+ static bool canLoadFrame(HTMLFrameOwnerElement& owner)
{
- for (Node* node = owner; node; node = node->parentOrShadowHostNode()) {
+ for (Node* node = &owner; node; node = node->parentOrShadowHostNode()) {
if (disabledSubtreeRoots().contains(node))
return false;
}
@@ -108,7 +108,7 @@ private:
return nodes;
}
- Node* m_root;
+ Node& m_root;
};
} // namespace WebCore
« no previous file with comments | « Source/core/html/HTMLFrameElementBase.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698