Skip to content

Commit 056f43a

Browse files
Automated g4 rollback of changelist 793942432.
*** Reason for rollback *** The latest LTS Abseil (lts_2025_05_12) does not support it yet. *** Original change description *** Fix 3 ClangInliner findings: * The use of this symbol has been deprecated and marked for inlining. The function being deprecated is absl::Mutex::TryLock. * The use of this symbol has been deprecated and marked for inlining. The function being deprecated is absl::Mutex::Unlock. * The use of this symbol has been deprecated and marked for inlining. The function being deprecated is absl::MutexLock::MutexLock. *** PiperOrigin-RevId: 794871239
1 parent f9aecd4 commit 056f43a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/ios/ios_engine.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,13 @@ bool IosEngine::MaybeCreateNewChunk(commands::Command *command)
274274
input->set_type(commands::Input::SEND_COMMAND);
275275
commands::SessionCommand *session_command = input->mutable_command();
276276
session_command->set_type(commands::SessionCommand::STOP_KEY_TOGGLING);
277-
if (!mutex_.try_lock()) {
277+
// TODO(b/438604511): Use try_lock when Abseil LTS supports it.
278+
if (!mutex_.TryLock()) {
278279
return false;
279280
}
280281
const bool ret = session_handler_->EvalCommand(command);
281-
mutex_.unlock();
282+
// TODO(b/438604511): Use unlock when Abseil LTS supports it.
283+
mutex_.Unlock();
282284
return ret;
283285
}
284286

@@ -294,7 +296,8 @@ bool IosEngine::SendSessionCommand(
294296
}
295297

296298
bool IosEngine::EvalCommandLockGuarded(commands::Command *command) {
297-
absl::MutexLock l(mutex_);
299+
// TODO(b/438604511): Use mutex_ (w/o &) when Abseil LTS supports it.
300+
absl::MutexLock l(&mutex_);
298301
if (command->input().has_command()) {
299302
previous_command_ = command->input().command().type();
300303
} else {

0 commit comments

Comments
 (0)