Commit 3e235f2e authored by W. James MacLean's avatar W. James MacLean Committed by Commit Bot

Add DumpWithoutCrashing for OOPIF page scale bug.

Diagnostics to detect source of non-unit page scale factor in OOPIF
subframes on CrOS/Android. Will be removed before stable release.

Bug: 845097
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I046040e85d2fb2d4e13d425bb093cca11f6a871d
Reviewed-on: https://chromium-review.googlesource.com/1185872Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Commit-Queue: James MacLean <wjmaclean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585814}
parent 6dcbe653
...@@ -13,8 +13,11 @@ ...@@ -13,8 +13,11 @@
#include <set> #include <set>
#include "base/containers/adapters.h" #include "base/containers/adapters.h"
#include "base/debug/crash_logging.h"
#include "base/debug/dump_without_crashing.h"
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/strings/stringprintf.h"
#include "base/timer/elapsed_timer.h" #include "base/timer/elapsed_timer.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_event_argument.h" #include "base/trace_event/trace_event_argument.h"
...@@ -853,8 +856,19 @@ void LayerTreeImpl::UpdatePageScaleNode() { ...@@ -853,8 +856,19 @@ void LayerTreeImpl::UpdatePageScaleNode() {
void LayerTreeImpl::SetPageScaleOnActiveTree(float active_page_scale) { void LayerTreeImpl::SetPageScaleOnActiveTree(float active_page_scale) {
DCHECK(IsActiveTree()); DCHECK(IsActiveTree());
DCHECK(lifecycle().AllowsPropertyTreeAccess()); DCHECK(lifecycle().AllowsPropertyTreeAccess());
if (page_scale_factor()->SetCurrent( float clamped_page_scale = ClampPageScaleFactorToLimits(active_page_scale);
ClampPageScaleFactorToLimits(active_page_scale))) { // Temporary crash logging for https://crbug.com/845097.
static bool has_dumped_without_crashing = false;
if (host_impl_->settings().is_layer_tree_for_subframe &&
clamped_page_scale != 1.f && !has_dumped_without_crashing) {
has_dumped_without_crashing = true;
static auto* psf_oopif_error = base::debug::AllocateCrashKeyString(
"psf_oopif_error", base::debug::CrashKeySize::Size32);
base::debug::SetCrashKeyString(
psf_oopif_error, base::StringPrintf("%f", clamped_page_scale));
base::debug::DumpWithoutCrashing();
}
if (page_scale_factor()->SetCurrent(clamped_page_scale)) {
DidUpdatePageScale(); DidUpdatePageScale();
UpdatePageScaleNode(); UpdatePageScaleNode();
} }
......
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