Chromium Code Reviews| Index: content/renderer/renderer_webapplicationcachehost_impl.cc |
| diff --git a/content/renderer/renderer_webapplicationcachehost_impl.cc b/content/renderer/renderer_webapplicationcachehost_impl.cc |
| index 7ac1620e9d7ee184441fc0608c996ad227e98953..7208291f1cf460113d852d860de886177625cb27 100644 |
| --- a/content/renderer/renderer_webapplicationcachehost_impl.cc |
| +++ b/content/renderer/renderer_webapplicationcachehost_impl.cc |
| @@ -8,6 +8,7 @@ |
| #include "content/renderer/render_thread_impl.h" |
| #include "content/renderer/render_view_impl.h" |
| #include "third_party/WebKit/public/web/WebFrame.h" |
| +#include "third_party/WebKit/public/web/WebLocalFrame.h" |
| #include "third_party/WebKit/public/web/WebView.h" |
| using blink::WebApplicationCacheHostClient; |
| @@ -34,9 +35,13 @@ void RendererWebApplicationCacheHostImpl::OnLogMessage( |
| return; |
| blink::WebFrame* frame = render_view->webview()->mainFrame(); |
| - frame->addMessageToConsole(WebConsoleMessage( |
| - static_cast<WebConsoleMessage::Level>(log_level), |
| - blink::WebString::fromUTF8(message.c_str()))); |
| + if (!frame->isWebLocalFrame()) |
| + return; |
| + // TODO(michaeln): Make app cache host per-frame and correctly report to the |
|
dcheng
2016/12/27 08:48:59
+michaeln, +ananta since I know there's some appca
|
| + // involved frame. |
| + frame->toWebLocalFrame()->addMessageToConsole( |
| + WebConsoleMessage(static_cast<WebConsoleMessage::Level>(log_level), |
| + blink::WebString::fromUTF8(message.c_str()))); |
| } |
| void RendererWebApplicationCacheHostImpl::OnContentBlocked( |