OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "config.h" |
| 6 #include "core/streams/ScriptUnderlyingSource.h" |
| 7 |
| 8 #include <v8.h> |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 ScriptPromise ScriptUnderlyingSource::start(ScriptValue stream) |
| 13 { |
| 14 // In ReadableStream.js, we special-case externally-controlled streams by ha
ving them pass themselves to start |
| 15 // as the first argument. This allows us to create a ScriptReadableStreamCon
troller. |
| 16 |
| 17 // TODO pointer usage here is presumably very borked |
| 18 m_controller = new ScriptReadableStreamController(stream); |
| 19 |
| 20 return startImpl(); |
| 21 } |
| 22 |
| 23 ScriptPromise ScriptUnderlyingSource::pull() |
| 24 { |
| 25 return pullImpl(); |
| 26 } |
| 27 |
| 28 ScriptPromise ScriptUnderlyingSource::cancel(ScriptValue reason) |
| 29 { |
| 30 return cancelImpl(reason); |
| 31 } |
| 32 |
| 33 DEFINE_TRACE(ScriptUnderlyingSource) |
| 34 { |
| 35 } |
| 36 |
| 37 } // namespace blink |
OLD | NEW |