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

Side by Side Diff: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp

Issue 1878253003: Allow explicit conversion operators and implement WTF::OwnPtr::operator bool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/compositorworker/CompositorWorkerThread.h" 5 #include "modules/compositorworker/CompositorWorkerThread.h"
6 6
7 #include "bindings/core/v8/V8GCController.h" 7 #include "bindings/core/v8/V8GCController.h"
8 #include "bindings/core/v8/V8Initializer.h" 8 #include "bindings/core/v8/V8Initializer.h"
9 #include "core/workers/WorkerObjectProxy.h" 9 #include "core/workers/WorkerObjectProxy.h"
10 #include "core/workers/WorkerThreadStartupData.h" 10 #include "core/workers/WorkerThreadStartupData.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 MutexLocker lock(m_mutex); 110 MutexLocker lock(m_mutex);
111 ASSERT(isMainThread() || m_thread->isCurrentThread()); 111 ASSERT(isMainThread() || m_thread->isCurrentThread());
112 if (m_workerCount > 1) 112 if (m_workerCount > 1)
113 return; 113 return;
114 114
115 m_isolate->TerminateExecution(); 115 m_isolate->TerminateExecution();
116 } 116 }
117 117
118 bool hasThreadForTest() 118 bool hasThreadForTest()
119 { 119 {
120 return m_thread; 120 return !!m_thread;
121 } 121 }
122 122
123 bool hasIsolateForTest() 123 bool hasIsolateForTest()
124 { 124 {
125 return m_isolate; 125 return m_isolate;
126 } 126 }
127 127
128 private: 128 private:
129 CompositorWorkerSharedState() {} 129 CompositorWorkerSharedState() {}
130 ~CompositorWorkerSharedState() {} 130 ~CompositorWorkerSharedState() {}
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 { 210 {
211 return CompositorWorkerSharedState::instance().hasThreadForTest(); 211 return CompositorWorkerSharedState::instance().hasThreadForTest();
212 } 212 }
213 213
214 bool CompositorWorkerThread::hasIsolateForTest() 214 bool CompositorWorkerThread::hasIsolateForTest()
215 { 215 {
216 return CompositorWorkerSharedState::instance().hasIsolateForTest(); 216 return CompositorWorkerSharedState::instance().hasIsolateForTest();
217 } 217 }
218 218
219 } // namespace blink 219 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698