Revert "Add WebRTC specific dcheck_always_on."

This reverts commit 9f2a20f4342a3e86e1f9fdfe6f3d76fb539d41c2.

Reason for revert: see explanation on 
https://bugs.chromium.org/p/webrtc/issues/detail?id=12988#c4.

Original change's description:
> Add WebRTC specific dcheck_always_on.
>
> Inspired by V8 CL: crrev.com/c/3038528.
>
> This makes the WebRTC's dcheck control independent of Chromium's and
> prepares switching Chromium's default behavior without affecting
> WebRTC developers or builders.
>
> Preparation for: https://crrev.com/c/2893204
>
> Bug: chromium:1225701, webrtc:12988
> Change-Id: Ia0d21f9fb8e9d7704fd1beca16504c301a263b3b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226465
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Markus Handell <handellm@webrtc.org>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Cr-Commit-Position: refs/heads/master@{#34512}

TBR=mbonadei@webrtc.org,dpranke@google.com,orphis@webrtc.org,handellm@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I408ca6222e0d16e3d521708dfe5322236cf280d4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1225701, webrtc:12988
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226562
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34518}
diff --git a/BUILD.gn b/BUILD.gn
index e82f0fc..bc51df7 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -252,10 +252,6 @@
   cflags_objc = []
   defines = []
 
-  if (rtc_dcheck_always_on) {
-    defines += [ "RTC_DCHECK_ALWAYS_ON" ]
-  }
-
   if (rtc_enable_protobuf) {
     defines += [ "WEBRTC_ENABLE_PROTOBUF=1" ]
   } else {
diff --git a/rtc_base/checks.h b/rtc_base/checks.h
index e7584fb..21fca7e 100644
--- a/rtc_base/checks.h
+++ b/rtc_base/checks.h
@@ -14,7 +14,7 @@
 // If you for some reson need to know if DCHECKs are on, test the value of
 // RTC_DCHECK_IS_ON. (Test its value, not if it's defined; it'll always be
 // defined, to either a true or a false value.)
-#if !defined(NDEBUG) || defined(RTC_DCHECK_ALWAYS_ON)
+#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
 #define RTC_DCHECK_IS_ON 1
 #else
 #define RTC_DCHECK_IS_ON 0
diff --git a/rtc_base/thread.cc b/rtc_base/thread.cc
index b54cded..8ca9ce7 100644
--- a/rtc_base/thread.cc
+++ b/rtc_base/thread.cc
@@ -1044,7 +1044,7 @@
 }
 
 void Thread::AllowInvokesToThread(Thread* thread) {
-#if (!defined(NDEBUG) || defined(RTC_DCHECK_ALWAYS_ON))
+#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
   if (!IsCurrent()) {
     PostTask(webrtc::ToQueuedTask(
         [thread, this]() { AllowInvokesToThread(thread); }));
@@ -1057,7 +1057,7 @@
 }
 
 void Thread::DisallowAllInvokes() {
-#if (!defined(NDEBUG) || defined(RTC_DCHECK_ALWAYS_ON))
+#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
   if (!IsCurrent()) {
     PostTask(webrtc::ToQueuedTask([this]() { DisallowAllInvokes(); }));
     return;
@@ -1082,7 +1082,7 @@
 // Returns true if no policies added or if there is at least one policy
 // that permits invocation to |target| thread.
 bool Thread::IsInvokeToThreadAllowed(rtc::Thread* target) {
-#if (!defined(NDEBUG) || defined(RTC_DCHECK_ALWAYS_ON))
+#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
   RTC_DCHECK_RUN_ON(this);
   if (!invoke_policy_enabled_) {
     return true;
diff --git a/rtc_base/thread.h b/rtc_base/thread.h
index cb5a0e9..6e68f1a 100644
--- a/rtc_base/thread.h
+++ b/rtc_base/thread.h
@@ -400,17 +400,15 @@
 
   // Allows invoke to specified |thread|. Thread never will be dereferenced and
   // will be used only for reference-based comparison, so instance can be safely
-  // deleted. If NDEBUG is defined and RTC_DCHECK_ALWAYS_ON is undefined do
-  // nothing.
+  // deleted. If NDEBUG is defined and DCHECK_ALWAYS_ON is undefined do nothing.
   void AllowInvokesToThread(Thread* thread);
 
-  // If NDEBUG is defined and RTC_DCHECK_ALWAYS_ON is undefined do nothing.
+  // If NDEBUG is defined and DCHECK_ALWAYS_ON is undefined do nothing.
   void DisallowAllInvokes();
   // Returns true if |target| was allowed by AllowInvokesToThread() or if no
   // calls were made to AllowInvokesToThread and DisallowAllInvokes. Otherwise
   // returns false.
-  // If NDEBUG is defined and RTC_DCHECK_ALWAYS_ON is undefined always returns
-  // true.
+  // If NDEBUG is defined and DCHECK_ALWAYS_ON is undefined always returns true.
   bool IsInvokeToThreadAllowed(rtc::Thread* target);
 
   // Posts a task to invoke the functor on |this| thread asynchronously, i.e.
diff --git a/rtc_base/thread_unittest.cc b/rtc_base/thread_unittest.cc
index e603930..789bdd9 100644
--- a/rtc_base/thread_unittest.cc
+++ b/rtc_base/thread_unittest.cc
@@ -366,7 +366,7 @@
   ThreadManager::Instance()->SetCurrentThread(current_thread);
 }
 
-#if (!defined(NDEBUG) || defined(RTC_DCHECK_ALWAYS_ON))
+#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
 TEST(ThreadTest, InvokeToThreadAllowedReturnsTrueWithoutPolicies) {
   // Create and start the thread.
   auto thread1 = Thread::CreateWithSocketServer();
@@ -410,7 +410,7 @@
   Thread* th_main = Thread::Current();
   th_main->ProcessMessages(100);
 }
-#endif  // (!defined(NDEBUG) || defined(RTC_DCHECK_ALWAYS_ON))
+#endif  // (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
 
 TEST(ThreadTest, InvokesAllowedByDefault) {
   // Create and start the thread.
diff --git a/tools_webrtc/coverage/generate_ios_coverage_command.py b/tools_webrtc/coverage/generate_ios_coverage_command.py
index ff17c58..e01a75c 100644
--- a/tools_webrtc/coverage/generate_ios_coverage_command.py
+++ b/tools_webrtc/coverage/generate_ios_coverage_command.py
@@ -89,7 +89,7 @@
     target_cpu = 'x64' if is_simulator else 'arm64'
     return ([] + ['target_os="ios"'] + ['target_cpu="%s"' % target_cpu] +
             ['use_clang_coverage=true'] + ['is_component_build=false'] +
-            ['rtc_dcheck_always_on=true'])
+            ['dcheck_always_on=true'])
 
 
 def GenerateIOSSimulatorCommand():
@@ -103,7 +103,7 @@
                     [FormatIossimTest(t, is_xctest=True) for t in XC_TESTS] +
                     [FormatIossimTest(t, is_xctest=False) for t in TESTS])
 
-    print 'To get code coverage using iOS sim just run following commands:'
+    print 'To get code coverage using iOS simulator just run following commands:'
     print ''
     print ' '.join(gn_cmd)
     print ''
diff --git a/tools_webrtc/mb/docs/user_guide.md b/tools_webrtc/mb/docs/user_guide.md
index a8857d2..8c66cd3 100644
--- a/tools_webrtc/mb/docs/user_guide.md
+++ b/tools_webrtc/mb/docs/user_guide.md
@@ -248,8 +248,8 @@
   }
   'mixins': {
     'bot': {
-      'gyp_defines': 'use_goma=1 rtc_dcheck_always_on=0',
-      'gn_args': 'use_goma=true rtc_dcheck_always_on=false',
+      'gyp_defines': 'use_goma=1 dcheck_always_on=0',
+      'gn_args': 'use_goma=true dcheck_always_on=false',
     },
     'debug': {
       'gn_args': 'is_debug=true',
@@ -267,8 +267,8 @@
       'gyp_defines': 'component=shared_library',
     },
     'trybot': {
-      'gyp_defines': 'rtc_dcheck_always_on=1',
-      'gn_args': 'rtc_dcheck_always_on=true',
+      'gyp_defines': 'dcheck_always_on=1',
+      'gn_args': 'dcheck_always_on=true',
     }
   }
 }
@@ -276,7 +276,7 @@
 
 and you ran `mb gen -c linux_release_trybot //out/Release`, it would
 translate into a call to `gyp_chromium -G Release` with `GYP_DEFINES` set to
-`"use_goma=true rtc_dcheck_always_on=false rtc_dcheck_always_on=true"`.
+`"use_goma=true dcheck_always_on=false dcheck_always_on=true"`.
 
 (From that you can see that mb is intentionally dumb and does not
 attempt to de-dup the flags, it lets gyp do that).
diff --git a/tools_webrtc/mb/mb_config.pyl b/tools_webrtc/mb/mb_config.pyl
index 74678f8..253a57a 100644
--- a/tools_webrtc/mb/mb_config.pyl
+++ b/tools_webrtc/mb/mb_config.pyl
@@ -459,8 +459,8 @@
       'gn_args': 'is_clang=true',
     },
 
-    'rtc_dcheck_always_on': {
-      'gn_args': 'rtc_dcheck_always_on=true',
+    'dcheck_always_on': {
+      'gn_args': 'dcheck_always_on=true',
     },
 
     'debug': {
@@ -548,11 +548,11 @@
     },
 
     'release_bot': {
-      'mixins': ['pure_release_bot', 'rtc_dcheck_always_on'],
+      'mixins': ['pure_release_bot', 'dcheck_always_on'],
     },
 
     'release_bot_no_goma': {
-      'mixins': ['release', 'no_goma', 'rtc_dcheck_always_on'],
+      'mixins': ['release', 'no_goma', 'dcheck_always_on'],
     },
 
     'tsan': {
diff --git a/webrtc.gni b/webrtc.gni
index c1fd479..a338d72 100644
--- a/webrtc.gni
+++ b/webrtc.gni
@@ -6,7 +6,6 @@
 # in the file PATENTS.  All contributing project authors may
 # be found in the AUTHORS file in the root of the source tree.
 import("//build/config/arm.gni")
-import("//build/config/dcheck_always_on.gni")
 import("//build/config/features.gni")
 import("//build/config/mips.gni")
 import("//build/config/sanitizers/sanitizers.gni")
@@ -37,11 +36,6 @@
 }
 
 declare_args() {
-  # Separate control for dchecks in V8. Defaults to Chromium's behavior if
-  # built with Chromium.
-  # When set to true, it will enable RTC_DCHECK() also in Release builds.
-  rtc_dcheck_always_on = build_with_chromium && dcheck_always_on
-
   # Setting this to true will make RTC_EXPORT (see rtc_base/system/rtc_export.h)
   # expand to code that will manage symbols visibility.
   rtc_enable_symbol_export = false