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

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

Issue 1118673002: Implement ReadableStream as a V8 extra (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Cleanups; make controller a member instead of arg Created 5 years, 7 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/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
OLDNEW
« no previous file with comments | « Source/core/streams/ScriptUnderlyingSource.h ('k') | Source/core/streams/ScriptUnderlyingSource.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698