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