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

Issue 2191853002: Remove #if ENABLE(ASSERT) in bool MutexBase::locked().

Created:
4 years, 4 months ago by HyungwookLee
Modified:
4 years, 4 months ago
Reviewers:
esprehn, Mikhail
CC:
blink-reviews, blink-reviews-wtf_chromium.org, chromium-reviews, Mikhail
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove #if ENABLE(ASSERT) in bool MutexBase::locked(). It is dificult to replace ASSERT with DCHECK if we are using MutexBase::locked(). Hence we need to remove #if ENABLE(ASSERT) in bool MutexBase::locked(). BUG=626446 R=mikhail.pozdnyakov@intel.com

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -18 lines) Patch
M third_party/WebKit/Source/wtf/ThreadingPrimitives.h View 2 chunks +0 lines, -4 lines 1 comment Download
M third_party/WebKit/Source/wtf/ThreadingPthreads.cpp View 6 chunks +0 lines, -14 lines 0 comments Download

Messages

Total messages: 6 (4 generated)
HyungwookLee
4 years, 4 months ago (2016-07-28 11:41:39 UTC) #2
esprehn
4 years, 4 months ago (2016-08-05 23:18:56 UTC) #6
I think you want to instead do:

#if ENABLE(ASSERT)
  bool locked() { return ...; }
#else
  bool locked() { RELEASE_NOTREACHED(); return false; }
#endif

I don't think it's worth switching to DCHECK if it makes all the locks bigger
with members.

https://codereview.chromium.org/2191853002/diff/1/third_party/WebKit/Source/w...
File third_party/WebKit/Source/wtf/ThreadingPrimitives.h (right):

https://codereview.chromium.org/2191853002/diff/1/third_party/WebKit/Source/w...
third_party/WebKit/Source/wtf/ThreadingPrimitives.h:53: size_t m_recursionCount;
I don't think we want to do this, it makes all of the mutexes bigger.

Powered by Google App Engine
This is Rietveld 408576698