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