Commit 82e6de7b authored by arthursonzogni's avatar arthursonzogni Committed by Chromium LUCI CQ

Removing instrumentation for bug 1153966/1153961

The culprit has been reverted:
https://chromium-review.googlesource.com/c/chromium/src/+/2625867
and we verified the crashed were gone.

R=danakj@chromium.org

Bug: 1153966,1153961
Change-Id: Ic99bbed56808188c92a34b8761e43b5621cf9e0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2632988Reviewed-by: default avatardanakj <danakj@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844154}
parent f6a3bddc
...@@ -1772,12 +1772,10 @@ void RenderWidgetHostImpl::RemoveInputEventObserver( ...@@ -1772,12 +1772,10 @@ void RenderWidgetHostImpl::RemoveInputEventObserver(
void RenderWidgetHostImpl::AddObserver(RenderWidgetHostObserver* observer) { void RenderWidgetHostImpl::AddObserver(RenderWidgetHostObserver* observer) {
observers_.AddObserver(observer); observers_.AddObserver(observer);
observers_size_for_debug_++;
} }
void RenderWidgetHostImpl::RemoveObserver(RenderWidgetHostObserver* observer) { void RenderWidgetHostImpl::RemoveObserver(RenderWidgetHostObserver* observer) {
observers_.RemoveObserver(observer); observers_.RemoveObserver(observer);
observers_size_for_debug_--;
} }
void RenderWidgetHostImpl::GetScreenInfo(blink::ScreenInfo* result) { void RenderWidgetHostImpl::GetScreenInfo(blink::ScreenInfo* result) {
...@@ -2230,28 +2228,11 @@ void RenderWidgetHostImpl::SetAutoResize(bool enable, ...@@ -2230,28 +2228,11 @@ void RenderWidgetHostImpl::SetAutoResize(bool enable,
} }
void RenderWidgetHostImpl::Destroy(bool also_delete) { void RenderWidgetHostImpl::Destroy(bool also_delete) {
// TODO(https://crbug.com/1153966): Turns this back into a DCHECK once the bug DCHECK(!destroyed_);
// is fixed.
CHECK(!destroyed_);
destroyed_ = true; destroyed_ = true;
// TODO(https://crbug.com/1153966): This is instrumentation about a bug for (auto& observer : observers_)
// happening while iterating on the |observers_|. Remove this when the bug
// will be fixed.
base::WeakPtr<RenderWidgetHostImpl> weak_ptr = GetWeakPtr();
int observer_list_iteration_before_call = 0;
int observer_list_iteration_after_call = 0;
int observer_list_size = observers_size_for_debug_;
base::debug::Alias(&observer_list_iteration_before_call);
base::debug::Alias(&observer_list_iteration_after_call);
base::debug::Alias(&observer_list_size);
for (auto& observer : observers_) {
observer_list_iteration_before_call++;
observer.RenderWidgetHostDestroyed(this); observer.RenderWidgetHostDestroyed(this);
observer_list_iteration_after_call++;
CHECK(weak_ptr);
}
NotificationService::current()->Notify( NotificationService::current()->Notify(
NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, Source<RenderWidgetHost>(this), NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, Source<RenderWidgetHost>(this),
......
...@@ -1226,9 +1226,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl ...@@ -1226,9 +1226,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// The observers watching us. // The observers watching us.
base::ObserverList<RenderWidgetHostObserver> observers_; base::ObserverList<RenderWidgetHostObserver> observers_;
// TODO(https://crbug.com/1153966): Remove this after closing this bug.
int observers_size_for_debug_ = 0;
// This is true if the renderer is currently unresponsive. // This is true if the renderer is currently unresponsive.
bool is_unresponsive_ = false; bool is_unresponsive_ = false;
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
namespace content { namespace content {
RenderProcessHostObserver::~RenderProcessHostObserver() { RenderProcessHostObserver::~RenderProcessHostObserver() {
// TODO(https://crbug.com/1153961): Instrumentation. When fixed, decide if DCHECK(!IsInObserverList());
// this CHECK should be removed or turned into a DCHECK.
CHECK(!IsInObserverList());
} }
} // namespace content } // namespace content
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
namespace content { namespace content {
RenderWidgetHostObserver::~RenderWidgetHostObserver() { RenderWidgetHostObserver::~RenderWidgetHostObserver() {
// TODO(https://crbug.com/1153966): Instrumentation. When fixed, decide if DCHECK(!IsInObserverList());
// this CHECK should be removed or turned into a DCHECK.
CHECK(!IsInObserverList());
} }
} // namespace content } // namespace content
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment