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

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

Issue 1404523005: Implement author-constructible ReadableStream using V8 extras (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor test tweaks Created 5 years 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
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
1 (function(global, binding, v8) { 5 (function(global, binding, v8) {
2 'use strict'; 6 'use strict';
3 7
4 const defineProperty = global.Object.defineProperty; 8 const defineProperty = global.Object.defineProperty;
5 9
6 class ByteLengthQueuingStrategy { 10 class ByteLengthQueuingStrategy {
7 constructor(options) { 11 constructor(options) {
8 defineProperty(this, 'highWaterMark', { 12 defineProperty(this, 'highWaterMark', {
9 value: options.highWaterMark, 13 value: options.highWaterMark,
10 enumerable: true, 14 enumerable: true,
11 configurable: true, 15 configurable: true,
12 writable: true 16 writable: true
13 }); 17 });
14 } 18 }
15 size(chunk) { return chunk.byteLength; } 19 size(chunk) { return chunk.byteLength; }
16 } 20 }
17 21
18 defineProperty(global, 'ByteLengthQueuingStrategy', { 22 defineProperty(global, 'ByteLengthQueuingStrategy', {
19 value: ByteLengthQueuingStrategy, 23 value: ByteLengthQueuingStrategy,
20 enumerable: false, 24 enumerable: false,
21 configurable: true, 25 configurable: true,
22 writable: true 26 writable: true
23 }); 27 });
24 }); 28 });
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/streams/CountQueuingStrategy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698