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

Unified 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: Minor test tweaks Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/streams/CountQueuingStrategy.js
diff --git a/third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js b/third_party/WebKit/Source/core/streams/CountQueuingStrategy.js
similarity index 55%
copy from third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js
copy to third_party/WebKit/Source/core/streams/CountQueuingStrategy.js
index 5fdb7c99cb6be0b9c4a5d971c384ce8b81c6c486..61567c899512697bcc2a8ce65b931282974f0661 100644
--- a/third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js
+++ b/third_party/WebKit/Source/core/streams/CountQueuingStrategy.js
@@ -1,9 +1,13 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
(function(global, binding, v8) {
'use strict';
const defineProperty = global.Object.defineProperty;
- class ByteLengthQueuingStrategy {
+ class CountQueuingStrategy {
constructor(options) {
defineProperty(this, 'highWaterMark', {
value: options.highWaterMark,
@@ -12,11 +16,11 @@
writable: true
});
}
- size(chunk) { return chunk.byteLength; }
+ size(chunk) { return 1; }
}
- defineProperty(global, 'ByteLengthQueuingStrategy', {
- value: ByteLengthQueuingStrategy,
+ defineProperty(global, 'CountQueuingStrategy', {
+ value: CountQueuingStrategy,
enumerable: false,
configurable: true,
writable: true
« no previous file with comments | « third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js ('k') | third_party/WebKit/Source/core/streams/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698