Issue metadata
Sign in to add a comment
|
Replace ASSERT(isGraphOwner()) with DCHECK in WebAudio |
||||||||||||||||||||||
Issue description
There are a few places in WebAudio where we currently cannot replace ASSERT with DCHECK such as
ASSERT(isGraphOwner())
isGraphOwner() is defined only if ENABLE(ASSERT) is true, so we can't just replace ASSERT with DCHECK.
Perhaps we can just remove the ENABLE(ASSERT) so isGraphOwner is always defined?
,
Jul 20 2016
I've replaced ASSERT with DCHECK without ASSERT(isGraphOwner()) first as followed. https://codereview.chromium.org/2159403002/ In my investigation, RecursiveMutex do not have locked() API anymore. Hence we can't remove ENABLE(ASSERT) for isGraphOwner() without solving RecursiveMutex API issue.
,
Jul 20 2016
I didn't follow your comment on isGraphOwner and RecursiveMutex. These ASSERTs are enabled when doing a debug build.
,
Jul 25 2016
I got compilation error as following when I remove remove ENABLE(ASSERT) for isGraphOwner().
../../third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp:74:32: error: no member named 'locked' in 'WTF::RecursiveMutex'; did you mean 'lock'?
return m_contextGraphMutex.locked();
,
Jul 25 2016
This is strange. These are supposed to be enabled for a debug build and I have no problems building a debug build. This configuration is tested by the trybots as well. I just tried this on my linux machine. Debug builds work fine.
,
Jul 25 2016
hyungwook.lee@ What platform are you using for the development? OSX works fine with the removal of ENABLE(ASSERT).
,
Jul 26 2016
I'm using gcc version 4.9.3 (Ubuntu 4.9.3-8ubuntu2~14.04) on Ubuntu 14.04
,
Jul 26 2016
My first investigation seems wrong, I can see MutexBase has locked() API.
class WTF_EXPORT MutexBase {
WTF_MAKE_NONCOPYABLE(MutexBase); USING_FAST_MALLOC(MutexBase);
public:
#if ENABLE(ASSERT)
bool locked() { return m_mutex.m_recursionCount > 0; }
#endif
I'm testing it on release build not debug build.
,
Jul 26 2016
Ah, that explains it. I think you should ask on the blink-dev mailing list on whether it's ok to remove the #if ENABLE(ASSERT) there. That should fix the problem.
,
Aug 23 2016
How is this issue different from the issue 637509 ? Perhaps we can mark this as a dupe and close?
,
Aug 23 2016
No, issue 637509 is for replacing ASSERT with DCHECK, except for the isGraphOwner case, which is what this is about.
,
Aug 23 2016
Better summary.
,
Apr 14 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by hyungwoo...@navercorp.com
, Jul 19 2016