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

Unified Diff: Source/core/loader/BeaconLoader.cpp

Issue 1311433008: Migrate PingLoader to be a LocalFrameLifecycleObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix style. Created 5 years, 4 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 | « Source/core/html/HTMLAnchorElement.cpp ('k') | Source/core/loader/PingLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/BeaconLoader.cpp
diff --git a/Source/core/loader/BeaconLoader.cpp b/Source/core/loader/BeaconLoader.cpp
index b12dc62b51d6c09557628211e589bde3b24b56ff..83e1a1dc868cb7c59566c0377f10eb54d0675731 100644
--- a/Source/core/loader/BeaconLoader.cpp
+++ b/Source/core/loader/BeaconLoader.cpp
@@ -148,12 +148,9 @@ void BeaconLoader::willSendRequest(WebURLLoader*, WebURLRequest& passedNewReques
StoredCredentials withCredentials = AllowStoredCredentials;
ResourceLoaderOptions options;
if (!CrossOriginAccessControl::handleRedirect(m_beaconOrigin.get(), newRequest, redirectResponse, withCredentials, options, errorDescription)) {
- if (page() && page()->mainFrame()) {
- if (page()->mainFrame()->isLocalFrame()) {
- LocalFrame* localFrame = toLocalFrame(page()->mainFrame());
- if (localFrame->document())
- localFrame->document()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorDescription));
- }
+ if (LocalFrame* localFrame = frame()) {
+ if (localFrame->document())
+ localFrame->document()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorDescription));
}
// Cancel the load and self destruct.
dispose();
« no previous file with comments | « Source/core/html/HTMLAnchorElement.cpp ('k') | Source/core/loader/PingLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698