Commit b7ee0c52 authored by Sigurður Ásgeirsson's avatar Sigurður Ásgeirsson Committed by Commit Bot

Revert "Mojo: Dump core on a configurable queue length threshold."

This reverts commit 75bbdfb2.

Reason for revert: https://crbug.com/1007970 - crashing without leave on MacOS.

Original change's description:
> Mojo: Dump core on a configurable queue length threshold.
> 
> Bug: 1003391
> Change-Id: Ibdc72029f647eff989bebb9b6542cffb8273064a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1815847
> Reviewed-by: Ken Rockot <rockot@google.com>
> Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#699387}

TBR=rockot@google.com,siggi@chromium.org

Change-Id: Ie1434d93cce863d898959eaeca3ad24b4205c76d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1003391
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1825137Reviewed-by: default avatarSigurður Ásgeirsson <siggi@chromium.org>
Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699762}
parent b457c120
......@@ -7,7 +7,6 @@
#include <stdint.h>
#include "base/bind.h"
#include "base/debug/dump_without_crashing.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
......@@ -64,11 +63,6 @@ const base::FeatureParam<int> kMojoRecordUnreadMessageCountQuotaValue = {
100 // Use a 100 message quote by default.
};
const base::FeatureParam<int> kMojoRecordUnreadMessageCountCrashThreshold = {
&features::kMojoRecordUnreadMessageCount, "CrashThreshold",
0 // Set to zero to disable crash dumps by default.
};
int UnreadMessageCountQuota() {
static const bool enabled =
base::FeatureList::IsEnabled(features::kMojoRecordUnreadMessageCount);
......@@ -83,26 +77,6 @@ int UnreadMessageCountQuota() {
return quota;
}
void MaybeDumpWithoutCrashing(int quota_used) {
static const int crash_theshold =
kMojoRecordUnreadMessageCountCrashThreshold.Get();
if (crash_theshold == 0)
return;
static bool have_crashed = false;
if (have_crashed)
return;
// Only crash once per process/per run. Note that this is slightly racy
// against concurrent quota overruns on multiple threads, but that's fine.
have_crashed = true;
// This is happening because the user of the interface implicated on the crash
// stack has queued up an unreasonable number of messages, namely
// |quota_used|.
base::debug::DumpWithoutCrashing();
}
} // namespace
// Used to efficiently maintain a doubly-linked list of all Connectors
......@@ -394,10 +368,8 @@ bool Connector::Accept(Message* message) {
MojoResult rv = MojoQueryQuota(message_pipe_.get().value(),
MOJO_QUOTA_TYPE_UNREAD_MESSAGE_COUNT,
nullptr, &limit, &usage);
if (rv == MOJO_RESULT_OK && usage > max_unread_message_quota_used_) {
MaybeDumpWithoutCrashing(usage);
if (rv == MOJO_RESULT_OK && usage > max_unread_message_quota_used_)
max_unread_message_quota_used_ = usage;
}
}
MojoResult rv =
......
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