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

Side by Side Diff: Source/core/streams/ReadableStreamImpl.h

Issue 1107793002: Oilpan: have DOMException be on the heap by default. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/streams/ReadableStream.cpp ('k') | Source/core/streams/ReadableStreamReader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef ReadableStreamImpl_h 5 #ifndef ReadableStreamImpl_h
6 #define ReadableStreamImpl_h 6 #define ReadableStreamImpl_h
7 7
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptPromiseResolver.h" 10 #include "bindings/core/v8/ScriptPromiseResolver.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 void resolveAllPendingReadsAsDone() override 142 void resolveAllPendingReadsAsDone() override
143 { 143 {
144 for (auto& resolver : m_pendingReads) { 144 for (auto& resolver : m_pendingReads) {
145 ScriptState::Scope scope(resolver->scriptState()); 145 ScriptState::Scope scope(resolver->scriptState());
146 resolver->resolve(v8IteratorResultDone(resolver->scriptState())); 146 resolver->resolve(v8IteratorResultDone(resolver->scriptState()));
147 } 147 }
148 m_pendingReads.clear(); 148 m_pendingReads.clear();
149 } 149 }
150 150
151 void rejectAllPendingReads(PassRefPtrWillBeRawPtr<DOMException> r) override 151 void rejectAllPendingReads(DOMException* reason) override
152 { 152 {
153 RefPtrWillBeRawPtr<DOMException> reason = r;
154 for (auto& resolver : m_pendingReads) 153 for (auto& resolver : m_pendingReads)
155 resolver->reject(reason); 154 resolver->reject(reason);
156 m_pendingReads.clear(); 155 m_pendingReads.clear();
157 } 156 }
158 157
159 bool shouldApplyBackpressure() override 158 bool shouldApplyBackpressure() override
160 { 159 {
161 return m_strategy->shouldApplyBackpressure(m_totalQueueSize, this); 160 return m_strategy->shouldApplyBackpressure(m_totalQueueSize, this);
162 } 161 }
163 bool hasPendingReads() const override { return !m_pendingReads.isEmpty(); } 162 bool hasPendingReads() const override { return !m_pendingReads.isEmpty(); }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 ASSERT(queue.isEmpty()); 217 ASSERT(queue.isEmpty());
219 218
220 queue.swap(m_queue); 219 queue.swap(m_queue);
221 m_totalQueueSize = 0; 220 m_totalQueueSize = 0;
222 readInternalPostAction(); 221 readInternalPostAction();
223 } 222 }
224 223
225 } // namespace blink 224 } // namespace blink
226 225
227 #endif // ReadableStreamImpl_h 226 #endif // ReadableStreamImpl_h
OLDNEW
« no previous file with comments | « Source/core/streams/ReadableStream.cpp ('k') | Source/core/streams/ReadableStreamReader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698