| OLD | NEW |
| 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 "core/streams/ReadableStream.h" | 5 #include "core/streams/ReadableStream.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "bindings/core/v8/ScriptFunction.h" | 8 #include "bindings/core/v8/ScriptFunction.h" |
| 9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 10 #include "bindings/core/v8/V8Binding.h" | 10 #include "bindings/core/v8/V8Binding.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 public: | 21 public: |
| 22 static v8::Local<v8::Function> create(ScriptState* scriptState) | 22 static v8::Local<v8::Function> create(ScriptState* scriptState) |
| 23 { | 23 { |
| 24 return (new ConstUndefined(scriptState))->bindToV8Function(); | 24 return (new ConstUndefined(scriptState))->bindToV8Function(); |
| 25 } | 25 } |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 explicit ConstUndefined(ScriptState* scriptState) : ScriptFunction(scriptSta
te) { } | 28 explicit ConstUndefined(ScriptState* scriptState) : ScriptFunction(scriptSta
te) { } |
| 29 ScriptValue call(ScriptValue value) override | 29 ScriptValue call(ScriptValue value) override |
| 30 { | 30 { |
| 31 return ScriptValue(scriptState(), v8::Undefined(scriptState()->isolate()
)); | 31 return ScriptValue(getScriptState(), v8::Undefined(getScriptState()->iso
late())); |
| 32 } | 32 } |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 } // namespace | 35 } // namespace |
| 36 | 36 |
| 37 ReadableStream::ReadableStream(UnderlyingSource* source) | 37 ReadableStream::ReadableStream(UnderlyingSource* source) |
| 38 : m_source(source) | 38 : m_source(source) |
| 39 , m_isStarted(false) | 39 , m_isStarted(false) |
| 40 , m_isDraining(false) | 40 , m_isDraining(false) |
| 41 , m_isPulling(false) | 41 , m_isPulling(false) |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 } | 183 } |
| 184 | 184 |
| 185 DEFINE_TRACE(ReadableStream) | 185 DEFINE_TRACE(ReadableStream) |
| 186 { | 186 { |
| 187 visitor->trace(m_source); | 187 visitor->trace(m_source); |
| 188 visitor->trace(m_exception); | 188 visitor->trace(m_exception); |
| 189 visitor->trace(m_reader); | 189 visitor->trace(m_reader); |
| 190 } | 190 } |
| 191 | 191 |
| 192 } // namespace blink | 192 } // namespace blink |
| OLD | NEW |