Allow recursive check for RTC_DCHECK_RUN_ON macro

instead of using Lock/Unlock attributes, use Assert attribute to annotate code is running on certain task queue or thread.

Such check better matches what is checked, in particular allows to
recheck (and thus better document) currently used task queue

Bug: None
Change-Id: I5bc1c397efbc8342cf7915093b578bb015c85651
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269381
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37619}
diff --git a/api/sequence_checker.h b/api/sequence_checker.h
index 5db7b9e..b9f466b 100644
--- a/api/sequence_checker.h
+++ b/api/sequence_checker.h
@@ -107,10 +107,9 @@
 #define RTC_RUN_ON(x) \
   RTC_THREAD_ANNOTATION_ATTRIBUTE__(exclusive_locks_required(x))
 
-#define RTC_DCHECK_RUN_ON(x)                                     \
-  webrtc::webrtc_sequence_checker_internal::SequenceCheckerScope \
-      seq_check_scope(x);                                        \
-  RTC_DCHECK((x)->IsCurrent())                                   \
-      << webrtc::webrtc_sequence_checker_internal::ExpectationToString(x)
+#define RTC_DCHECK_RUN_ON(x)                                               \
+  RTC_DCHECK((x)->IsCurrent())                                             \
+      << webrtc::webrtc_sequence_checker_internal::ExpectationToString(x); \
+  webrtc::webrtc_sequence_checker_internal::AssertHeld(x)
 
 #endif  // API_SEQUENCE_CHECKER_H_