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); |
} |