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

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

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "bindings/core/v8/ScriptStreamerThread.h" 5 #include "bindings/core/v8/ScriptStreamerThread.h"
6 6
7 #include <memory>
7 #include "bindings/core/v8/ScriptStreamer.h" 8 #include "bindings/core/v8/ScriptStreamer.h"
8 #include "core/inspector/InspectorTraceEvents.h" 9 #include "core/inspector/InspectorTraceEvents.h"
9 #include "platform/WebTaskRunner.h" 10 #include "platform/WebTaskRunner.h"
10 #include "platform/instrumentation/tracing/TraceEvent.h" 11 #include "platform/instrumentation/tracing/TraceEvent.h"
11 #include "public/platform/Platform.h" 12 #include "public/platform/Platform.h"
12 #include "public/platform/WebTraceLocation.h" 13 #include "public/platform/WebTraceLocation.h"
13 #include "wtf/PtrUtil.h" 14 #include "wtf/PtrUtil.h"
14 #include <memory>
15 15
16 namespace blink { 16 namespace blink {
17 17
18 static ScriptStreamerThread* s_sharedThread = 0; 18 static ScriptStreamerThread* s_sharedThread = 0;
19 // Guards s_sharedThread. s_sharedThread is initialized and deleted in the main 19 // Guards s_sharedThread. s_sharedThread is initialized and deleted in the main
20 // thread, but also used by the streamer thread. Races can occur during 20 // thread, but also used by the streamer thread. Races can occur during
21 // shutdown. 21 // shutdown.
22 static Mutex* s_mutex = 0; 22 static Mutex* s_mutex = 0;
23 23
24 void ScriptStreamerThread::init() { 24 void ScriptStreamerThread::init() {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 task->Run(); 69 task->Run();
70 streamer->streamingCompleteOnBackgroundThread(); 70 streamer->streamingCompleteOnBackgroundThread();
71 MutexLocker locker(*s_mutex); 71 MutexLocker locker(*s_mutex);
72 ScriptStreamerThread* thread = shared(); 72 ScriptStreamerThread* thread = shared();
73 if (thread) 73 if (thread)
74 thread->taskDone(); 74 thread->taskDone();
75 // If thread is 0, we're shutting down. 75 // If thread is 0, we're shutting down.
76 } 76 }
77 77
78 } // namespace blink 78 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698