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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 1747183002: Check that RWHI isn't deleted manually while owned by a scoped_ptr in RVHI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 view_.reset(); 1462 view_.reset();
1463 } 1463 }
1464 1464
1465 process_->RemoveRoute(routing_id_); 1465 process_->RemoveRoute(routing_id_);
1466 g_routing_id_widget_map.Get().erase( 1466 g_routing_id_widget_map.Get().erase(
1467 RenderWidgetHostID(process_->GetID(), routing_id_)); 1467 RenderWidgetHostID(process_->GetID(), routing_id_));
1468 1468
1469 if (delegate_) 1469 if (delegate_)
1470 delegate_->RenderWidgetDeleted(this); 1470 delegate_->RenderWidgetDeleted(this);
1471 1471
1472 if (also_delete) 1472 if (also_delete) {
1473 CHECK(!owner_delegate_);
nasko 2016/03/01 17:13:43 Is the goal of this to help us discover further Ua
gzobqq 2016/03/01 18:30:13 I would guess that if there is a way to fail this
1473 delete this; 1474 delete this;
1475 }
1474 } 1476 }
1475 1477
1476 void RenderWidgetHostImpl::RendererIsUnresponsive() { 1478 void RenderWidgetHostImpl::RendererIsUnresponsive() {
1477 NotificationService::current()->Notify( 1479 NotificationService::current()->Notify(
1478 NOTIFICATION_RENDER_WIDGET_HOST_HANG, 1480 NOTIFICATION_RENDER_WIDGET_HOST_HANG,
1479 Source<RenderWidgetHost>(this), 1481 Source<RenderWidgetHost>(this),
1480 NotificationService::NoDetails()); 1482 NotificationService::NoDetails());
1481 is_unresponsive_ = true; 1483 is_unresponsive_ = true;
1482 if (delegate_) 1484 if (delegate_)
1483 delegate_->RendererUnresponsive(this); 1485 delegate_->RendererUnresponsive(this);
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
2253 } 2255 }
2254 2256
2255 #if defined(OS_WIN) 2257 #if defined(OS_WIN)
2256 gfx::NativeViewAccessible 2258 gfx::NativeViewAccessible
2257 RenderWidgetHostImpl::GetParentNativeViewAccessible() { 2259 RenderWidgetHostImpl::GetParentNativeViewAccessible() {
2258 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; 2260 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL;
2259 } 2261 }
2260 #endif 2262 #endif
2261 2263
2262 } // namespace content 2264 } // namespace content
OLDNEW
« 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