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

Unified Diff: third_party/WebKit/Source/core/frame/Deprecation.cpp

Issue 2849403002: Use const ref for LocalFrame::LocalFrameRoot and FrameTree::Top (Closed)
Patch Set: fix compile and dchecks Created 3 years, 8 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/frame/Deprecation.cpp
diff --git a/third_party/WebKit/Source/core/frame/Deprecation.cpp b/third_party/WebKit/Source/core/frame/Deprecation.cpp
index a2fdb48282e6db259159bf6b3fdbb172f765fa01..725b5afe7ad21b4590ef4f8311a7655751744fff 100644
--- a/third_party/WebKit/Source/core/frame/Deprecation.cpp
+++ b/third_party/WebKit/Source/core/frame/Deprecation.cpp
@@ -161,9 +161,9 @@ void Deprecation::CountDeprecationCrossOriginIframe(
// Check to see if the frame can script into the top level document.
SecurityOrigin* security_origin =
frame->GetSecurityContext()->GetSecurityOrigin();
- Frame* top = frame->Tree().Top();
- if (top && !security_origin->CanAccess(
- top->GetSecurityContext()->GetSecurityOrigin()))
+ Frame& top = frame->Tree().Top();
+ if (!security_origin->CanAccess(
+ top.GetSecurityContext()->GetSecurityOrigin()))
CountDeprecation(frame, feature);
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMWindow.cpp ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698