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

Side by Side Diff: Source/core/streams/ReadableStream.cpp

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.h ('k') | Source/core/streams/ReadableStreamImpl.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 #include "config.h" 5 #include "config.h"
6 #include "core/streams/ReadableStream.h" 6 #include "core/streams/ReadableStream.h"
7 7
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/core/v8/ScriptFunction.h" 9 #include "bindings/core/v8/ScriptFunction.h"
10 #include "bindings/core/v8/ScriptPromiseResolver.h" 10 #include "bindings/core/v8/ScriptPromiseResolver.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 return cancelInternal(scriptState, reason); 107 return cancelInternal(scriptState, reason);
108 } 108 }
109 109
110 ScriptPromise ReadableStream::cancelInternal(ScriptState* scriptState, ScriptVal ue reason) 110 ScriptPromise ReadableStream::cancelInternal(ScriptState* scriptState, ScriptVal ue reason)
111 { 111 {
112 closeInternal(); 112 closeInternal();
113 return m_source->cancelSource(scriptState, reason).then(ConstUndefined::crea te(scriptState)); 113 return m_source->cancelSource(scriptState, reason).then(ConstUndefined::crea te(scriptState));
114 } 114 }
115 115
116 void ReadableStream::error(PassRefPtrWillBeRawPtr<DOMException> exception) 116 void ReadableStream::error(DOMException* exception)
117 { 117 {
118 if (m_state != ReadableStream::Readable) 118 if (m_state != ReadableStream::Readable)
119 return; 119 return;
120 120
121 m_exception = exception; 121 m_exception = exception;
122 clearQueue(); 122 clearQueue();
123 rejectAllPendingReads(m_exception); 123 rejectAllPendingReads(m_exception);
124 m_state = Errored; 124 m_state = Errored;
125 if (m_reader) 125 if (m_reader)
126 m_reader->releaseLock(); 126 m_reader->releaseLock();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 181 }
182 182
183 DEFINE_TRACE(ReadableStream) 183 DEFINE_TRACE(ReadableStream)
184 { 184 {
185 visitor->trace(m_source); 185 visitor->trace(m_source);
186 visitor->trace(m_exception); 186 visitor->trace(m_exception);
187 visitor->trace(m_reader); 187 visitor->trace(m_reader);
188 } 188 }
189 189
190 } // namespace blink 190 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/streams/ReadableStream.h ('k') | Source/core/streams/ReadableStreamImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698