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

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: comment. 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 62b9951b675116e75d2c18ed4ae9c0684b0c9ee5..e01e14f949f9218b1b2fe8d3f37988c683315aa0 100644
--- a/third_party/WebKit/Source/core/frame/UseCounter.cpp
+++ b/third_party/WebKit/Source/core/frame/UseCounter.cpp
@@ -740,12 +740,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