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

Unified Diff: third_party/WebKit/Source/core/loader/PingLoader.cpp

Issue 2415373002: Loading: bulk style errors fix in core/loader (Closed)
Patch Set: Created 4 years, 2 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/loader/PingLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/PingLoader.cpp b/third_party/WebKit/Source/core/loader/PingLoader.cpp
index eed8f67f6693885017d45206ad8931252fdc8f22..f8c7ad698e6033d2916fb52d78e0f6d43f3cda2d 100644
--- a/third_party/WebKit/Source/core/loader/PingLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/PingLoader.cpp
@@ -316,9 +316,10 @@ bool PingLoaderImpl::willFollowRedirect(
m_origin, newRequest, redirectResponse, AllowStoredCredentials,
options, errorDescription)) {
if (LocalFrame* localFrame = frame()) {
- if (localFrame->document())
+ if (localFrame->document()) {
localFrame->document()->addConsoleMessage(ConsoleMessage::create(
JSMessageSource, ErrorMessageLevel, errorDescription));
+ }
}
// Cancel the load and self destruct.
dispose();
@@ -490,10 +491,11 @@ void PingLoader::sendLinkAuditPing(LocalFrame* frame,
RefPtr<SecurityOrigin> pingOrigin = SecurityOrigin::create(pingURL);
if (protocolIs(frame->document()->url().getString(), "http") ||
- frame->document()->getSecurityOrigin()->canAccess(pingOrigin.get()))
+ frame->document()->getSecurityOrigin()->canAccess(pingOrigin.get())) {
request.setHTTPHeaderField(
HTTPNames::Ping_From,
AtomicString(frame->document()->url().getString()));
+ }
sendPingCommon(frame, request, FetchInitiatorTypeNames::ping,
AllowStoredCredentials, false);

Powered by Google App Engine
This is Rietveld 408576698