Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Issue 2384693002: Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere (Closed)

Created:
4 years, 2 months ago by kwiberg-webrtc
Modified:
4 years, 2 months ago
Reviewers:
ossu
CC:
webrtc-reviews_webrtc.org, kwiberg-webrtc, Andrew MacDonald, henrika_webrtc, tlegrand-webrtc, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, sdk-team_agora.io, peah-webrtc, minyue-webrtc, the sun, aluebs-webrtc, bjornv1, kjellander_webrtc
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere The former is always defined (by webrtc/base/checks.h) to either 0 or 1, whereas the latter isn't necessarily defined. NOTRY=true BUG=webrtc:6451 Committed: https://crrev.com/ab0b929321d37669165d5795268fa10a8c97ec5b Cr-Commit-Position: refs/heads/master@{#14474}

Patch Set 1 #

Total comments: 6

Patch Set 2 : !!! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -54 lines) Patch
M webrtc/api/statscollector.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/api/statstypes.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/base/buffer.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/base/checks.h View 2 chunks +7 lines, -4 lines 0 comments Download
M webrtc/base/criticalsection.h View 1 2 chunks +2 lines, -5 lines 0 comments Download
M webrtc/base/sequenced_task_checker.h View 1 1 chunk +2 lines, -11 lines 0 comments Download
M webrtc/base/sequenced_task_checker_unittest.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M webrtc/base/stringutils.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/base/thread_checker.h View 1 1 chunk +2 lines, -11 lines 0 comments Download
M webrtc/base/thread_checker_unittest.cc View 1 1 chunk +1 line, -5 lines 0 comments Download
M webrtc/common_audio/resampler/push_resampler.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M webrtc/media/sctp/sctpdataengine.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M webrtc/modules/audio_device/android/opensles_player.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/utility/source/process_thread_impl.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 22 (9 generated)
kwiberg-webrtc
This fixes a case where the code basically did #if DCHECK_ALWAYS_ON which isn't allowed now ...
4 years, 2 months ago (2016-09-30 08:57:31 UTC) #3
ossu
https://codereview.webrtc.org/2384693002/diff/1/webrtc/base/criticalsection.h File webrtc/base/criticalsection.h (right): https://codereview.webrtc.org/2384693002/diff/1/webrtc/base/criticalsection.h#newcode41 webrtc/base/criticalsection.h:41: #define CS_DEBUG_CHECKS (!!RTC_DCHECK_IS_ON) Why!!? uhm I mean, why "!!"? ...
4 years, 2 months ago (2016-09-30 09:08:49 UTC) #4
kwiberg-webrtc
https://codereview.webrtc.org/2384693002/diff/1/webrtc/base/criticalsection.h File webrtc/base/criticalsection.h (right): https://codereview.webrtc.org/2384693002/diff/1/webrtc/base/criticalsection.h#newcode41 webrtc/base/criticalsection.h:41: #define CS_DEBUG_CHECKS (!!RTC_DCHECK_IS_ON) On 2016/09/30 09:08:49, ossu wrote: > ...
4 years, 2 months ago (2016-09-30 09:14:21 UTC) #5
kjellander_webrtc
I think I'll leave this review to the ones that knows the language better (ossu ...
4 years, 2 months ago (2016-09-30 10:42:28 UTC) #6
kwiberg-webrtc
https://codereview.webrtc.org/2384693002/diff/1/webrtc/base/criticalsection.h File webrtc/base/criticalsection.h (right): https://codereview.webrtc.org/2384693002/diff/1/webrtc/base/criticalsection.h#newcode41 webrtc/base/criticalsection.h:41: #define CS_DEBUG_CHECKS (!!RTC_DCHECK_IS_ON) On 2016/09/30 10:42:28, kjellander_webrtc wrote: > ...
4 years, 2 months ago (2016-09-30 11:20:41 UTC) #8
kwiberg-webrtc
New patch set uploaded.
4 years, 2 months ago (2016-10-01 01:05:28 UTC) #9
ossu
On 2016/10/01 01:05:28, kwiberg-webrtc wrote: > New patch set uploaded. Great name! :) LGTM
4 years, 2 months ago (2016-10-03 08:33:15 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2384693002/20001
4 years, 2 months ago (2016-10-03 08:58:15 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_rel on master.tryserver.webrtc (JOB_TIMED_OUT, no build URL)
4 years, 2 months ago (2016-10-03 10:58:45 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2384693002/20001
4 years, 2 months ago (2016-10-03 12:03:05 UTC) #17
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 2 months ago (2016-10-03 12:04:25 UTC) #19
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/ab0b929321d37669165d5795268fa10a8c97ec5b Cr-Commit-Position: refs/heads/master@{#14474}
4 years, 2 months ago (2016-10-03 12:04:30 UTC) #21
guidou
4 years, 2 months ago (2016-10-03 15:32:21 UTC) #22
Message was sent while issue was closed.
A revert of this CL (patchset #2 id:20001) has been created in
https://codereview.webrtc.org/2384083004/ by guidou@webrtc.org.

The reason for reverting is: This CL breaks FYI bots with a compile error.

Sample error:
jingle/glue/thread_wrapper.cc -o obj/jingle/jingle_glue/thread_wrapper.o
In file included from ../../jingle/glue/thread_wrapper.cc:5:
In file included from ../../jingle/glue/thread_wrapper.h:16:
In file included from ../../base/message_loop/message_loop.h:17:
In file included from ../../base/memory/ref_counted.h:19:
../../base/logging.h:598:1: error: call to 'MakeCheckOpString' is ambiguous
DEFINE_CHECK_OP_IMPL(EQ, ==)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:592:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, names); \
                ^~~~~~~~~~~~~~~~~
../../jingle/glue/thread_wrapper.cc:46:3: note: in instantiation of function
template specialization 'logging::CheckEQImpl<rtc::Thread *,
jingle_glue::JingleThreadWrapper *>' requested here
  DCHECK_EQ(rtc::Thread::Current(), current());
  ^
../../base/logging.h:748:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                              ^
../../base/logging.h:721:18: note: expanded from macro 'DCHECK_OP'
      ::logging::Check##name##Impl((val1), (val2),                     \
                 ^
<scratch space>:102:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:555:14: note: candidate function [with t1 = rtc::Thread *,
t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
../../third_party/webrtc/base/checks.h:122:14: note: candidate function [with t1
= rtc::Thread *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
In file included from ../../jingle/glue/thread_wrapper.cc:5:
In file included from ../../jingle/glue/thread_wrapper.h:16:
In file included from ../../base/message_loop/message_loop.h:17:
In file included from ../../base/memory/ref_counted.h:19:
../../base/logging.h:598:1: error: call to 'MakeCheckOpString' is ambiguous
DEFINE_CHECK_OP_IMPL(EQ, ==)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:592:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, names); \
                ^~~~~~~~~~~~~~~~~
../../jingle/glue/thread_wrapper.cc:81:3: note: in instantiation of function
template specialization 'logging::CheckEQImpl<jingle_glue::JingleThreadWrapper
*, jingle_glue::JingleThreadWrapper *>' requested here
  DCHECK_EQ(this, JingleThreadWrapper::current());
  ^
../../base/logging.h:748:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                              ^
../../base/logging.h:721:18: note: expanded from macro 'DCHECK_OP'
      ::logging::Check##name##Impl((val1), (val2),                     \
                 ^
<scratch space>:5:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:555:14: note: candidate function [with t1 =
jingle_glue::JingleThreadWrapper *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
../../third_party/webrtc/base/checks.h:122:14: note: candidate function [with t1
= jingle_glue::JingleThreadWrapper *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
In file included from ../../jingle/glue/thread_wrapper.cc:5:
In file included from ../../jingle/glue/thread_wrapper.h:16:
In file included from ../../base/message_loop/message_loop.h:17:
In file included from ../../base/memory/ref_counted.h:19:
../../base/logging.h:598:1: error: call to 'MakeCheckOpString' is ambiguous
DEFINE_CHECK_OP_IMPL(EQ, ==)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:592:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, names); \
                ^~~~~~~~~~~~~~~~~
../../jingle/glue/thread_wrapper.cc:82:3: note: in instantiation of function
template specialization 'logging::CheckEQImpl<jingle_glue::JingleThreadWrapper
*, rtc::Thread *>' requested here
  DCHECK_EQ(this, rtc::Thread::Current());
  ^
../../base/logging.h:748:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                              ^
../../base/logging.h:721:18: note: expanded from macro 'DCHECK_OP'
      ::logging::Check##name##Impl((val1), (val2),                     \
                 ^
<scratch space>:12:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:555:14: note: candidate function [with t1 =
jingle_glue::JingleThreadWrapper *, t2 = rtc::Thread *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
../../third_party/webrtc/base/checks.h:122:14: note: candidate function [with t1
= jingle_glue::JingleThreadWrapper *, t2 = rtc::Thread *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
3 errors generated.

.

Powered by Google App Engine
This is Rietveld 408576698