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

Unified Diff: content/renderer/render_widget.cc

Issue 1397323004: Disable support for swapped out RenderFrame(Host) and add instrumentation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « content/common/site_isolation_policy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 081f0832fcadeb0e234088a01822491d8835df50..149a4b2885d91e0064baa426d438575f8f930de0 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -7,6 +7,7 @@
#include "base/auto_reset.h"
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/debug/dump_without_crashing.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
@@ -1292,6 +1293,20 @@ void RenderWidget::OnMouseCaptureLost() {
void RenderWidget::OnSetFocus(bool enable) {
has_focus_ = enable;
+
+ // TODO(nasko): This code is here to help diagnose https://crbug.com/541578.
+ if (webwidget_->isWebView()) {
+ blink::WebView* view = static_cast<blink::WebView*>(webwidget_);
+ if (view->mainFrame()->isWebRemoteFrame()) {
+ blink::WebFrame* mainFrame = view->mainFrame();
+
+ base::debug::Alias(&mainFrame);
+ base::debug::Alias(&is_swapped_out_);
+
+ base::debug::DumpWithoutCrashing();
+ }
+ }
+
if (webwidget_)
webwidget_->setFocus(enable);
}
« no previous file with comments | « content/common/site_isolation_policy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698