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

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

Issue 2743023002: Migrate WTF::Deque::append() to ::push_back() (Closed)
Patch Set: rebase Created 3 years, 9 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/ScriptStreamer.h" 5 #include "bindings/core/v8/ScriptStreamer.h"
6 6
7 #include "bindings/core/v8/ScriptStreamerThread.h" 7 #include "bindings/core/v8/ScriptStreamerThread.h"
8 #include "bindings/core/v8/V8ScriptRunner.h" 8 #include "bindings/core/v8/V8ScriptRunner.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/dom/Element.h" 10 #include "core/dom/Element.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 void clear() { 116 void clear() {
117 MutexLocker locker(m_mutex); 117 MutexLocker locker(m_mutex);
118 m_finished = false; 118 m_finished = false;
119 discardQueuedData(); 119 discardQueuedData();
120 } 120 }
121 121
122 void produce(const uint8_t* data, size_t length) { 122 void produce(const uint8_t* data, size_t length) {
123 MutexLocker locker(m_mutex); 123 MutexLocker locker(m_mutex);
124 DCHECK(!m_finished); 124 DCHECK(!m_finished);
125 m_data.append(std::make_pair(data, length)); 125 m_data.push_back(std::make_pair(data, length));
126 m_haveData.signal(); 126 m_haveData.signal();
127 } 127 }
128 128
129 void finish() { 129 void finish() {
130 MutexLocker locker(m_mutex); 130 MutexLocker locker(m_mutex);
131 m_finished = true; 131 m_finished = true;
132 m_haveData.signal(); 132 m_haveData.signal();
133 } 133 }
134 134
135 void consume(const uint8_t** data, size_t* length) { 135 void consume(const uint8_t** data, size_t* length) {
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 // needed. This makes PendingScript notify the ScriptStreamer when it is 613 // needed. This makes PendingScript notify the ScriptStreamer when it is
614 // destroyed. 614 // destroyed.
615 script->setStreamer(ScriptStreamer::create(script, scriptType, scriptState, 615 script->setStreamer(ScriptStreamer::create(script, scriptType, scriptState,
616 compileOption, 616 compileOption,
617 std::move(loadingTaskRunner))); 617 std::move(loadingTaskRunner)));
618 618
619 return true; 619 return true;
620 } 620 }
621 621
622 } // namespace blink 622 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698