| 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 "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" |
| 11 #include "bindings/core/v8/V8Binding.h" | 11 #include "bindings/core/v8/V8Binding.h" |
| 12 #include "core/dom/DOMException.h" | 12 #include "core/dom/DOMException.h" |
| 13 #include "core/dom/ExceptionCode.h" | 13 #include "core/dom/ExceptionCode.h" |
| 14 #include "core/streams/ReadableStreamReader.h" | 14 #include "core/streams/ReadableStreamReader.h" |
| 15 #include "core/streams/UnderlyingSource.h" | 15 #include "core/streams/UnderlyingSource.h" |
| 16 | 16 |
| 17 namespace blink { | 17 namespace blink { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 class ConstUndefined : public ScriptFunction { | 21 class ConstUndefined : public ScriptFunction { |
| 22 public: | 22 public: |
| 23 static v8::Handle<v8::Function> create(ScriptState* scriptState) | 23 static v8::Local<v8::Function> create(ScriptState* scriptState) |
| 24 { | 24 { |
| 25 return (new ConstUndefined(scriptState))->bindToV8Function(); | 25 return (new ConstUndefined(scriptState))->bindToV8Function(); |
| 26 } | 26 } |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 explicit ConstUndefined(ScriptState* scriptState) : ScriptFunction(scriptSta
te) { } | 29 explicit ConstUndefined(ScriptState* scriptState) : ScriptFunction(scriptSta
te) { } |
| 30 ScriptValue call(ScriptValue value) override | 30 ScriptValue call(ScriptValue value) override |
| 31 { | 31 { |
| 32 return ScriptValue(scriptState(), v8::Undefined(scriptState()->isolate()
)); | 32 return ScriptValue(scriptState(), v8::Undefined(scriptState()->isolate()
)); |
| 33 } | 33 } |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |