|
23 | 23 | #include "base/memory/ptr_util.h"
|
24 | 24 | #include "base/memory/raw_ptr.h"
|
25 | 25 | #include "base/no_destructor.h"
|
| 26 | +#include "base/not_fatal_until.h" |
26 | 27 | #include "base/ranges/algorithm.h"
|
27 | 28 | #include "base/sequence_checker.h"
|
28 | 29 | #include "base/strings/stringprintf.h"
|
@@ -68,10 +69,6 @@ BASE_FEATURE(kMojoChannelAssociatedSendUsesRunOrPostTask,
|
68 | 69 | "MojoChannelAssociatedSendUsesRunOrPostTask",
|
69 | 70 | base::FEATURE_DISABLED_BY_DEFAULT);
|
70 | 71 |
|
71 |
| -BASE_FEATURE(kMojoChannelAssociatedCrashesOnSendError, |
72 |
| - "MojoChannelAssociatedCrashesOnSendError", |
73 |
| - base::FEATURE_DISABLED_BY_DEFAULT); |
74 |
| - |
75 | 72 | // Used to track some internal Channel state in pursuit of message leaks.
|
76 | 73 | //
|
77 | 74 | // TODO(crbug.com/40563310): Remove this.
|
@@ -918,24 +915,14 @@ class ChannelAssociatedGroupController
|
918 | 915 | }
|
919 | 916 | return true;
|
920 | 917 | }
|
921 |
| - MojoResult result = connector_->AcceptAndGetResult(message); |
922 | 918 |
|
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; |
936 | 922 | }
|
937 | 923 |
|
938 |
| - return result == MOJO_RESULT_OK; |
| 924 | + CHECK(connector_->encountered_error(), base::NotFatalUntil::M135); |
| 925 | + return false; |
939 | 926 | }
|
940 | 927 |
|
941 | 928 | void SendMessageOnSequenceViaTask(mojo::Message message) {
|
|
0 commit comments