+ unique_lock<recursive_mutex> outer_lock(browser_mutex, defer_lock);
+ if (ignore_if_locked && !outer_lock.try_lock()) {
+ // If the caller is holding card_mutex, we need to abort here
+ // if we can't get browser_mutex, since otherwise, the UI thread
+ // might hold browser_mutex (blocking post_to_cef_ui_thread())
+ // and be waiting for card_mutex.
+ return;
+ }
+