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

Side by Side Diff: third_party/WebKit/Source/core/streams/ReadableStreamTempStub.js

Issue 1993033003: Ship "Response construction with ReadableStream". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 (function(global, binding, v8) {
6 'use strict';
7
8 // This file exists to help in the transition between IDL-implemented Readable Stream and V8 extras-implemented
9 // ReadableStream. Before it was introduced, there was an IDL-implemented prop erty of the global object named
10 // "ReadableStream" that had no useful behavior, but might have been depended on by web code for some reason.
11
12 // This file thus emulates that old IDL-implemented property, _when experiment al web platform features are disabled_.
13 // When experimental web platform features are _enabled_, the definition of gl obal.ReadableStream in
14 // ReadableStream.js takes priority.
15
16 // Eventually, when the ReadableStream.js implementation is ready to be enable d by default, we can remove this file.
17
18 const TypeError = global.TypeError;
19 const defineProperty = global.Object.defineProperty;
20
21 class ReadableStream {
22 constructor() {
23 throw new TypeError('Illegal constructor');
24 }
25
26 getReader() {
27 throw new TypeError('Illegal invocation');
28 }
29
30 cancel() {
31 throw new TypeError('Illegal invocation');
32 }
33 }
34
35 defineProperty(global, 'ReadableStream', {
36 value: ReadableStream,
37 enumerable: false,
38 configurable: true,
39 writable: true
40 });
41 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698