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

Unified Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 126081: Fix a UMR that happens while trying to forward mouse events. (Closed)
Patch Set: Created 11 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_view_host.cc
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index d7d787e6e78f22364d88d987e6de64e07949cd23..2fde17ffd73119a39699ebda17a74a0994eec24c 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -1411,11 +1411,14 @@ gfx::Rect RenderViewHost::GetRootWindowResizerRect() const {
void RenderViewHost::ForwardMouseEvent(
const WebKit::WebMouseEvent& mouse_event) {
- RenderWidgetHost::ForwardMouseEvent(mouse_event);
+ // We make a copy of the mouse event because
+ // RenderWidgetHost::ForwardMouseEvent will delete |mouse_event|.
+ WebKit::WebMouseEvent event_copy(mouse_event);
+ RenderWidgetHost::ForwardMouseEvent(event_copy);
RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
if (view) {
- switch (mouse_event.type) {
+ switch (event_copy.type) {
case WebInputEvent::MouseMove:
view->HandleMouseEvent();
break;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698