Commit 5bd9d0b1 authored by Arthur Sonzogni's avatar Arthur Sonzogni Committed by Commit Bot

Instrument subframe_navigation_filtering_throttle.

Add instrumentation to help debugging bug 904248.

Bug: 904248
Change-Id: Ic2e7401065a77d8f2e0b540fd7add4a1a210b2f1
Reviewed-on: https://chromium-review.googlesource.com/c/1371872Reviewed-by: default avatarJosh Karlin <jkarlin@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615875}
parent cf9f80b0
......@@ -7,6 +7,8 @@
#include <sstream>
#include "base/bind.h"
#include "base/debug/alias.h"
#include "base/debug/dump_without_crashing.h"
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "components/subresource_filter/content/browser/subresource_filter_observer_manager.h"
......@@ -124,7 +126,15 @@ void SubframeNavigationFilteringThrottle::NotifyLoadPolicy() const {
content::RenderFrameHost* starting_rfh =
navigation_handle()->GetWebContents()->UnsafeFindFrameByFrameTreeNodeId(
navigation_handle()->GetFrameTreeNodeId());
DCHECK(starting_rfh);
if (!starting_rfh) {
// This should not happen. See https://crbug.com/904248.
DEBUG_ALIAS_FOR_GURL(previous_url, navigation_handle()->GetPreviousURL());
DEBUG_ALIAS_FOR_GURL(new_url, navigation_handle()->GetURL());
base::debug::DumpWithoutCrashing();
observer_manager->NotifySubframeNavigationEvaluated(
navigation_handle(), load_policy_, false /* is_ad_subframe */);
return;
}
bool is_ad_subframe =
delegate_->CalculateIsAdSubframe(starting_rfh, load_policy_);
......
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