Index: third_party/WebKit/Source/core/dom/Document.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
index 9ceb4b53f0290f8d3a22ae079e8c345fd6416bbd..c2891f6ee083b2f91481cd43fd03f775d634951b 100644 |
--- a/third_party/WebKit/Source/core/dom/Document.cpp |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp |
@@ -4912,12 +4912,12 @@ const KURL Document::FirstPartyForCookies() const { |
// TODO(mkwst): This doesn't correctly handle sandboxed documents; we want to |
// look at their URL, but we can't because we don't know what it is. |
- Frame* top = GetFrame()->Tree().Top(); |
+ Frame& top = GetFrame()->Tree().Top(); |
KURL top_document_url = |
- top->IsLocalFrame() |
- ? ToLocalFrame(top)->GetDocument()->Url() |
+ top.IsLocalFrame() |
+ ? ToLocalFrame(top).GetDocument()->Url() |
: KURL(KURL(), |
- top->GetSecurityContext()->GetSecurityOrigin()->ToString()); |
+ top.GetSecurityContext()->GetSecurityOrigin()->ToString()); |
if (SchemeRegistry::ShouldTreatURLSchemeAsFirstPartyWhenTopLevel( |
top_document_url.Protocol())) |
return top_document_url; |
@@ -4926,8 +4926,8 @@ const KURL Document::FirstPartyForCookies() const { |
// document's SecurityOrigin. Sandboxing a document into a unique origin |
// shouldn't effect first-/third-party status for cookies and site data. |
const OriginAccessEntry& access_entry = |
- top->IsLocalFrame() |
- ? ToLocalFrame(top)->GetDocument()->AccessEntryFromURL() |
+ top.IsLocalFrame() |
+ ? ToLocalFrame(top).GetDocument()->AccessEntryFromURL() |
: OriginAccessEntry(top_document_url.Protocol(), |
top_document_url.Host(), |
OriginAccessEntry::kAllowRegisterableDomains); |