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

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

Issue 2877893002: Make UseCounter take a LocaFrame instead of any Frame (Closed)
Patch Set: Fix compile Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/events/TouchEvent.cpp ('k') | third_party/WebKit/Source/core/frame/Frame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/DOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/DOMWindow.cpp b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
index 494b9c9621af541389e29938ff45d6541bfcfb77..792f78ec63ec7d50d63e5d060caea628a4c826f3 100644
--- a/third_party/WebKit/Source/core/frame/DOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
@@ -223,15 +223,17 @@ void DOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message,
->ToString());
if (MixedContentChecker::IsMixedContent(source_document->GetSecurityOrigin(),
target_url)) {
- UseCounter::Count(GetFrame(), UseCounter::kPostMessageFromSecureToInsecure);
+ UseCounter::Count(source->GetFrame(),
+ UseCounter::kPostMessageFromSecureToInsecure);
} else if (MixedContentChecker::IsMixedContent(
GetFrame()->GetSecurityContext()->GetSecurityOrigin(),
source_document->Url())) {
- UseCounter::Count(GetFrame(), UseCounter::kPostMessageFromInsecureToSecure);
+ UseCounter::Count(source->GetFrame(),
+ UseCounter::kPostMessageFromInsecureToSecure);
if (MixedContentChecker::IsMixedContent(
GetFrame()->Tree().Top().GetSecurityContext()->GetSecurityOrigin(),
source_document->Url())) {
- UseCounter::Count(GetFrame(),
+ UseCounter::Count(source->GetFrame(),
UseCounter::kPostMessageFromInsecureToSecureToplevel);
}
}
@@ -240,7 +242,8 @@ void DOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message,
target_url, RedirectStatus::kNoRedirect,
SecurityViolationReportingPolicy::kSuppressReporting)) {
UseCounter::Count(
- GetFrame(), UseCounter::kPostMessageOutgoingWouldBeBlockedByConnectSrc);
+ source->GetFrame(),
+ UseCounter::kPostMessageOutgoingWouldBeBlockedByConnectSrc);
}
MessageEvent* event =
« no previous file with comments | « third_party/WebKit/Source/core/events/TouchEvent.cpp ('k') | third_party/WebKit/Source/core/frame/Frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698