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

Side by Side Diff: Source/modules/fetch/Body.cpp

Issue 1179733009: Always enable Oilpan for EventSource. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: msvc compile fix Created 5 years, 5 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/page/EventSource.idl ('k') | Source/modules/mediasource/SourceBuffer.cpp » ('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 "modules/fetch/Body.h" 6 #include "modules/fetch/Body.h"
7 7
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 m_state = Streaming; 184 m_state = Streaming;
185 if (m_bodyStreamBuffer) { 185 if (m_bodyStreamBuffer) {
186 m_bodyStreamBuffer->registerObserver(this); 186 m_bodyStreamBuffer->registerObserver(this);
187 onWrite(); 187 onWrite();
188 if (m_bodyStreamBuffer->hasError()) 188 if (m_bodyStreamBuffer->hasError())
189 return onError(); 189 return onError();
190 if (m_bodyStreamBuffer->isClosed()) 190 if (m_bodyStreamBuffer->isClosed())
191 return onClose(); 191 return onClose();
192 } else { 192 } else {
193 FileReaderLoader::ReadType readType = FileReaderLoader::ReadAsAr rayBuffer; 193 FileReaderLoader::ReadType readType = FileReaderLoader::ReadAsAr rayBuffer;
194 m_loader = adoptPtr(new FileReaderLoader(readType, this)); 194 m_loader = FileReaderLoader::create(readType, this);
195 m_loader->start(executionContext(), m_blobDataHandle); 195 m_loader->start(executionContext(), m_blobDataHandle);
196 } 196 }
197 } 197 }
198 } 198 }
199 199
200 ScriptPromise cancelSource(ScriptState* scriptState, ScriptValue reason) ove rride 200 ScriptPromise cancelSource(ScriptState* scriptState, ScriptValue reason) ove rride
201 { 201 {
202 cancel(); 202 cancel();
203 return ScriptPromise::cast(scriptState, v8::Undefined(scriptState->isola te())); 203 return ScriptPromise::cast(scriptState, v8::Undefined(scriptState->isola te()));
204 } 204 }
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 // FIXME: Implement this. 384 // FIXME: Implement this.
385 ASSERT_NOT_REACHED(); 385 ASSERT_NOT_REACHED();
386 break; 386 break;
387 case ResponseAsJSON: 387 case ResponseAsJSON:
388 case ResponseAsText: 388 case ResponseAsText:
389 break; 389 break;
390 default: 390 default:
391 ASSERT_NOT_REACHED(); 391 ASSERT_NOT_REACHED();
392 } 392 }
393 393
394 m_loader = adoptPtr(new FileReaderLoader(readType, this)); 394 m_loader = FileReaderLoader::create(readType, this);
395 m_loader->start(m_resolver->scriptState()->executionContext(), blobHandle); 395 m_loader->start(m_resolver->scriptState()->executionContext(), blobHandle);
396 396
397 return; 397 return;
398 } 398 }
399 399
400 ScriptPromise Body::arrayBuffer(ScriptState* scriptState) 400 ScriptPromise Body::arrayBuffer(ScriptState* scriptState)
401 { 401 {
402 return readAsync(scriptState, ResponseAsArrayBuffer); 402 return readAsync(scriptState, ResponseAsArrayBuffer);
403 } 403 }
404 404
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 void Body::didBlobHandleReceiveError(DOMException* exception) 588 void Body::didBlobHandleReceiveError(DOMException* exception)
589 { 589 {
590 if (!m_resolver) 590 if (!m_resolver)
591 return; 591 return;
592 m_streamSource->error(); 592 m_streamSource->error();
593 m_resolver->reject(exception); 593 m_resolver->reject(exception);
594 m_resolver.clear(); 594 m_resolver.clear();
595 } 595 }
596 596
597 } // namespace blink 597 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/EventSource.idl ('k') | Source/modules/mediasource/SourceBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698