Index: content/browser/renderer_host/render_widget_host_impl.cc |
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc |
index e8659f3d409ce26b4354ef1072667ef0610abfff..1d8a92cf5d9a66600b92e0e65b0cb97dd4e85998 100644 |
--- a/content/browser/renderer_host/render_widget_host_impl.cc |
+++ b/content/browser/renderer_host/render_widget_host_impl.cc |
@@ -85,6 +85,8 @@ using WebKit::WebTextDirection; |
namespace content { |
namespace { |
+bool g_check_for_pending_resize_ack = true; |
+ |
// How long to (synchronously) wait for the renderer to respond with a |
// PaintRect message, when our backing-store is invalid, before giving up and |
// returning a null or incorrectly sized backing-store from GetBackingStore. |
@@ -1215,6 +1217,11 @@ int64 RenderWidgetHostImpl::GetLatencyComponentId() { |
return GetRoutingID() | (static_cast<int64>(GetProcess()->GetID()) << 32); |
} |
+// static |
+void RenderWidgetHostImpl::DisableResizeAckCheckForTesting() { |
+ g_check_for_pending_resize_ack = false; |
+} |
+ |
ui::LatencyInfo RenderWidgetHostImpl::NewInputLatencyInfo() { |
ui::LatencyInfo info; |
info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_COMPONENT, |
@@ -1737,7 +1744,7 @@ void RenderWidgetHostImpl::OnUpdateRect( |
// resize_ack_pending_ needs to be cleared before we call DidPaintRect, since |
// that will end up reaching GetBackingStore. |
if (is_resize_ack) { |
- DCHECK(resize_ack_pending_); |
+ DCHECK(!g_check_for_pending_resize_ack || resize_ack_pending_); |
resize_ack_pending_ = false; |
in_flight_size_.SetSize(0, 0); |
} |