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

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

Issue 1853543002: Add -ifsameorigin to autoplay experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@autoplay
Patch Set: rebased. Created 4 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/UseCounter.cpp
diff --git a/third_party/WebKit/Source/core/frame/UseCounter.cpp b/third_party/WebKit/Source/core/frame/UseCounter.cpp
index 10e2f86246b491aa1d0e842b5d1699066e802c59..5edca15bac471559b38118b374735ca066fc8ae0 100644
--- a/third_party/WebKit/Source/core/frame/UseCounter.cpp
+++ b/third_party/WebKit/Source/core/frame/UseCounter.cpp
@@ -739,12 +739,7 @@ void UseCounter::countIfNotPrivateScript(v8::Isolate* isolate, const ExecutionCo
void UseCounter::countCrossOriginIframe(const Document& document, Feature feature)
{
Frame* frame = document.frame();
- if (!frame)
- return;
- // Check to see if the frame can script into the top level document.
- SecurityOrigin* securityOrigin = frame->securityContext()->getSecurityOrigin();
- Frame* top = frame->tree().top();
- if (top && !securityOrigin->canAccess(top->securityContext()->getSecurityOrigin()))
+ if (frame && frame->isCrossOrigin())
count(frame, feature);
}

Powered by Google App Engine
This is Rietveld 408576698