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

Unified Diff: Source/core/streams/ReadableStreamImpl.h

Issue 455303002: Add 'stream' to XMLHttpRequest response type. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@stream-promise-property-reset
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/streams/ReadableStream.idl ('k') | Source/core/streams/ReadableStreamTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/streams/ReadableStreamImpl.h
diff --git a/Source/core/streams/ReadableStreamImpl.h b/Source/core/streams/ReadableStreamImpl.h
index e1a7dfa6c4387468e6f1141bf899b2227b94324f..b6060b42b0ea2d244274880ae7143a2a4d041bcb 100644
--- a/Source/core/streams/ReadableStreamImpl.h
+++ b/Source/core/streams/ReadableStreamImpl.h
@@ -42,7 +42,7 @@ public:
typedef RefPtr<ArrayBuffer> HoldType;
typedef PassRefPtr<ArrayBuffer> PassType;
- static size_t size(PassType value) { return value->byteLength(); }
+ static size_t size(const PassType& value) { return value->byteLength(); }
static size_t size(const HoldType& value) { return value->byteLength(); }
static ScriptValue toScriptValue(ScriptState* scriptState, const HoldType& value)
{
@@ -56,13 +56,13 @@ public:
template <typename ChunkTypeTraits>
class ReadableStreamImpl : public ReadableStream {
public:
- ReadableStreamImpl(ScriptState* scriptState, UnderlyingSource* source, ExceptionState* exceptionState)
- : ReadableStream(scriptState, source, exceptionState)
+ ReadableStreamImpl(ExecutionContext* executionContext, UnderlyingSource* source)
+ : ReadableStream(executionContext, source)
, m_totalQueueSize(0) { }
virtual ~ReadableStreamImpl() { }
// ReadableStream methods
- virtual ScriptValue read(ScriptState*, ExceptionState*) OVERRIDE;
+ virtual ScriptValue read(ScriptState*, ExceptionState&) OVERRIDE;
bool enqueue(typename ChunkTypeTraits::PassType);
@@ -96,10 +96,10 @@ bool ReadableStreamImpl<ChunkTypeTraits>::enqueue(typename ChunkTypeTraits::Pass
}
template <typename ChunkTypeTraits>
-ScriptValue ReadableStreamImpl<ChunkTypeTraits>::read(ScriptState* scriptState, ExceptionState* exceptionState)
+ScriptValue ReadableStreamImpl<ChunkTypeTraits>::read(ScriptState* scriptState, ExceptionState& exceptionState)
{
readPreliminaryCheck(exceptionState);
- if (exceptionState->hadException())
+ if (exceptionState.hadException())
return ScriptValue();
ASSERT(state() == Readable);
ASSERT(!m_queue.isEmpty());
« no previous file with comments | « Source/core/streams/ReadableStream.idl ('k') | Source/core/streams/ReadableStreamTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698