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

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

Issue 1404523005: Implement author-constructible ReadableStream using V8 extras (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moar arrow functions Created 5 years, 2 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
1 (function(global, binding, v8) { 1 (function(global, binding, v8) {
2 'use strict'; 2 'use strict';
3 3
4 const defineProperty = global.Object.defineProperty; 4 const defineProperty = global.Object.defineProperty;
5 5
6 class ByteLengthQueuingStrategy { 6 class CountQueuingStrategy {
7 constructor(options) { 7 constructor(options) {
8 defineProperty(this, 'highWaterMark', { 8 defineProperty(this, 'highWaterMark', {
9 value: options.highWaterMark, 9 value: options.highWaterMark,
10 enumerable: true, 10 enumerable: true,
11 configurable: true, 11 configurable: true,
12 writable: true 12 writable: true
13 }); 13 });
14 } 14 }
15 size(chunk) { return chunk.byteLength; } 15 size(chunk) { return 1; }
16 } 16 }
17 17
18 defineProperty(global, 'ByteLengthQueuingStrategy', { 18 defineProperty(global, 'CountQueuingStrategy', {
19 value: ByteLengthQueuingStrategy, 19 value: CountQueuingStrategy,
20 enumerable: false, 20 enumerable: false,
21 configurable: true, 21 configurable: true,
22 writable: true 22 writable: true
23 }); 23 });
24 }); 24 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698