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

Side by Side Diff: Source/core/streams/UnderlyingSourceBase.cpp

Issue 1167343002: Add methods for creating V8 extras-based ReadableStreams from C++ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove C++ queuing strategies Created 5 years, 6 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
OLDNEW
(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/UnderlyingSourceBase.h"
7
8 #include <v8.h>
9
10 namespace blink {
11
12 ScriptPromise UnderlyingSourceBase::startWrapper(ScriptState* scriptState, Scrip tValue 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 ReadableStreamController(stream);
19
20 return start(scriptState);
21 }
22
23 ScriptPromise UnderlyingSourceBase::start(ScriptState* scriptState)
24 {
25 return ScriptPromise::cast(scriptState, v8::Undefined(scriptState->isolate() ));
26 }
27
28 ScriptPromise UnderlyingSourceBase::pull(ScriptState* scriptState)
29 {
30 return ScriptPromise::cast(scriptState, v8::Undefined(scriptState->isolate() ));
31 }
32
33 ScriptPromise UnderlyingSourceBase::cancel(ScriptState* scriptState, ScriptValue reason)
34 {
35 return ScriptPromise::cast(scriptState, v8::Undefined(scriptState->isolate() ));
36 }
37
38 DEFINE_TRACE(UnderlyingSourceBase)
39 {
40 }
41
42 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698