Commit 851e0429 authored by Maks Orlovich's avatar Maks Orlovich Committed by Commit Bot

RestrictCookieManager: add some crash keys to debug renderer kills on Android

What's strange is that in-NetworkService BadMessage catchers on desktop
doesn't seem to see this check failing.

Bug: 983090
Change-Id: I4ddd91909635fb978c7e0675ed48a567de8f0bbb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1713391Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#679939}
parent 7d5ef160
......@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/compiler_specific.h" // for FALLTHROUGH;
#include "base/debug/crash_logging.h"
#include "base/memory/weak_ptr.h"
#include "base/sequenced_task_runner.h"
#include "base/strings/string_util.h"
......@@ -443,6 +444,20 @@ bool RestrictedCookieManager::ValidateAccessToCookiesAt(const GURL& url) {
if (origin_.IsSameOriginWith(url::Origin::Create(url)))
return true;
// TODO(https://crbug.com/983090): Remove the crash keys once fixed.
static base::debug::CrashKeyString* bound_origin =
base::debug::AllocateCrashKeyString(
"restricted_cookie_manager_bound_origin",
base::debug::CrashKeySize::Size256);
base::debug::SetCrashKeyString(bound_origin, origin_.GetDebugString());
static base::debug::CrashKeyString* url_origin =
base::debug::AllocateCrashKeyString(
"restricted_cookie_manager_url_origin",
base::debug::CrashKeySize::Size256);
base::debug::SetCrashKeyString(url_origin,
url::Origin::Create(url).GetDebugString());
mojo::ReportBadMessage("Incorrect url origin");
return false;
}
......
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