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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp

Issue 2896443003: Replace remaining ASSERT with DCHECK/_EQ as appropriate (Closed)
Patch Set: actually fix WorkerBackingthread Created 3 years, 7 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/core/workers/WorkerBackingThread.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp b/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp
index 6b902633af6d7c9abac5e23d479646e620a486d7..d2709fe37ec439602166a57e6f6568ace7b8699c 100644
--- a/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp
@@ -20,17 +20,16 @@
namespace blink {
-#define DEFINE_STATIC_LOCAL_WITH_LOCK(type, name, arguments) \
- ASSERT(IsolatesMutex().Locked()); \
- static type& name = *new type arguments
-
static Mutex& IsolatesMutex() {
DEFINE_THREAD_SAFE_STATIC_LOCAL(Mutex, mutex, new Mutex);
return mutex;
}
static HashSet<v8::Isolate*>& Isolates() {
- DEFINE_STATIC_LOCAL_WITH_LOCK(HashSet<v8::Isolate*>, isolates, ());
+#if DCHECK_IS_ON()
+ DCHECK(IsolatesMutex().Locked());
+#endif
+ static HashSet<v8::Isolate*>& isolates = *new HashSet<v8::Isolate*>();
return isolates;
}

Powered by Google App Engine
This is Rietveld 408576698