Skip to content

Commit ac127ca

Browse files
fdoraychromeos-ci-prod
authored andcommitted
Remove the MojoChannelAssociatedCrashesOnSendError feature.
Stable experiment demonstrates that SendMessageOnSequence can only fail if `connector_->encountered_error()` is true, so we make the CHECK no longer gated by a feature. Bug: 40944462 Change-Id: Idcbf7e3d209468db1cc8e90d901a6f37f3b65abf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5954810 Commit-Queue: Ken Rockot <rockot@google.com> Auto-Submit: Francois Pierre Doray <fdoray@chromium.org> Reviewed-by: Ken Rockot <rockot@google.com> Cr-Commit-Position: refs/heads/main@{#1375332} CrOS-Libchrome-Original-Commit: fb40835386c539b13e3cb0bb42519cdb14dedacd
1 parent 7a2a748 commit ac127ca

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

ipc/ipc_mojo_bootstrap.cc

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "base/memory/ptr_util.h"
2424
#include "base/memory/raw_ptr.h"
2525
#include "base/no_destructor.h"
26+
#include "base/not_fatal_until.h"
2627
#include "base/ranges/algorithm.h"
2728
#include "base/sequence_checker.h"
2829
#include "base/strings/stringprintf.h"
@@ -68,10 +69,6 @@ BASE_FEATURE(kMojoChannelAssociatedSendUsesRunOrPostTask,
6869
"MojoChannelAssociatedSendUsesRunOrPostTask",
6970
base::FEATURE_DISABLED_BY_DEFAULT);
7071

71-
BASE_FEATURE(kMojoChannelAssociatedCrashesOnSendError,
72-
"MojoChannelAssociatedCrashesOnSendError",
73-
base::FEATURE_DISABLED_BY_DEFAULT);
74-
7572
// Used to track some internal Channel state in pursuit of message leaks.
7673
//
7774
// TODO(crbug.com/40563310): Remove this.
@@ -918,24 +915,14 @@ class ChannelAssociatedGroupController
918915
}
919916
return true;
920917
}
921-
MojoResult result = connector_->AcceptAndGetResult(message);
922918

923-
// TODO(crbug.com/40944462): Remove this code when the cause of skipped
924-
// messages with MojoChannelAssociatedSendUsesRunOrPostTask is understood,
925-
// or no later than November 2024.
926-
if (result != MOJO_RESULT_OK && !connector_->encountered_error() &&
927-
base::FeatureList::IsEnabled(
928-
kMojoChannelAssociatedCrashesOnSendError)) {
929-
// Crash when sending a message fails and `connector_` can send more
930-
// messages, as that breaks the assumption that messages are received in
931-
// the order they were sent. Note: `connector_` cannot send more messages
932-
// when `encountered_error()` is true.
933-
mojo::debug::ScopedMessageErrorCrashKey crash_key(
934-
base::StringPrintf("SendMessage failed with error %d", result));
935-
CHECK(false);
919+
MojoResult result = connector_->AcceptAndGetResult(message);
920+
if (result == MOJO_RESULT_OK) {
921+
return true;
936922
}
937923

938-
return result == MOJO_RESULT_OK;
924+
CHECK(connector_->encountered_error(), base::NotFatalUntil::M135);
925+
return false;
939926
}
940927

941928
void SendMessageOnSequenceViaTask(mojo::Message message) {

0 commit comments

Comments
 (0)