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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 void DeferredTaskHandler::unlock() { 54 void DeferredTaskHandler::unlock() {
55 m_contextGraphMutex.unlock(); 55 m_contextGraphMutex.unlock();
56 } 56 }
57 57
58 void DeferredTaskHandler::offlineLock() { 58 void DeferredTaskHandler::offlineLock() {
59 // CHECK is here to make sure to explicitly crash if this is called from 59 // CHECK is here to make sure to explicitly crash if this is called from
60 // other than the offline render thread, which is considered as the audio 60 // other than the offline render thread, which is considered as the audio
61 // thread in OfflineAudioContext. 61 // thread in OfflineAudioContext.
62 CHECK(isAudioThread()) << "DeferredTaskHandler::offlineLock() must be called " 62 // DeferredTaskHandler::offlineLock() must be called within the offline audio
63 "within the offline audio thread."; 63 // thread.
64 CHECK(isAudioThread());
64 65
65 m_contextGraphMutex.lock(); 66 m_contextGraphMutex.lock();
66 } 67 }
67 68
68 #if ENABLE(ASSERT) 69 #if ENABLE(ASSERT)
69 bool DeferredTaskHandler::isGraphOwner() { 70 bool DeferredTaskHandler::isGraphOwner() {
70 return m_contextGraphMutex.locked(); 71 return m_contextGraphMutex.locked();
71 } 72 }
72 #endif 73 #endif
73 74
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 m_deletableOrphanHandlers.clear(); 282 m_deletableOrphanHandlers.clear();
282 } 283 }
283 284
284 void DeferredTaskHandler::setAudioThreadToCurrentThread() { 285 void DeferredTaskHandler::setAudioThreadToCurrentThread() {
285 DCHECK(!isMainThread()); 286 DCHECK(!isMainThread());
286 ThreadIdentifier thread = currentThread(); 287 ThreadIdentifier thread = currentThread();
287 releaseStore(&m_audioThread, thread); 288 releaseStore(&m_audioThread, thread);
288 } 289 }
289 290
290 } // namespace blink 291 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698