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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptStreamerThread.cpp

Issue 2817533003: Replace ASSERT, RELEASE_ASSERT, and ASSERT_NOT_REACHED in bindings (Closed)
Patch Set: fixed dcheck build error Created 3 years, 8 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/ScriptStreamerThread.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerThread.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerThread.cpp
index c4558b8e70cee743c7117b3a724cb5466406f335..54914509b34059fbe9d9cf635587ba531c73aa6b 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerThread.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerThread.cpp
@@ -22,8 +22,8 @@ static ScriptStreamerThread* g_shared_thread = 0;
static Mutex* g_mutex = 0;
void ScriptStreamerThread::Init() {
- ASSERT(!g_shared_thread);
- ASSERT(IsMainThread());
+ DCHECK(!g_shared_thread);
+ DCHECK(IsMainThread());
// This is called in the main thread before any tasks are created, so no
// locking is needed.
g_mutex = new Mutex();
@@ -35,9 +35,9 @@ ScriptStreamerThread* ScriptStreamerThread::Shared() {
}
void ScriptStreamerThread::PostTask(std::unique_ptr<CrossThreadClosure> task) {
- ASSERT(IsMainThread());
+ DCHECK(IsMainThread());
MutexLocker locker(mutex_);
- ASSERT(!running_task_);
+ DCHECK(!running_task_);
running_task_ = true;
PlatformThread().GetWebTaskRunner()->PostTask(BLINK_FROM_HERE,
std::move(task));
@@ -45,7 +45,7 @@ void ScriptStreamerThread::PostTask(std::unique_ptr<CrossThreadClosure> task) {
void ScriptStreamerThread::TaskDone() {
MutexLocker locker(mutex_);
- ASSERT(running_task_);
+ DCHECK(running_task_);
running_task_ = false;
}

Powered by Google App Engine
This is Rietveld 408576698