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

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: 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 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 69%
copy from third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js
copy to third_party/WebKit/Source/core/streams/CountQueuingStrategy.js
index 5fdb7c99cb6be0b9c4a5d971c384ce8b81c6c486..500231e5844a42050485ad145df1b22de5c99984 100644
--- a/third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js
+++ b/third_party/WebKit/Source/core/streams/CountQueuingStrategy.js
@@ -3,7 +3,7 @@
const defineProperty = global.Object.defineProperty;
- class ByteLengthQueuingStrategy {
+ class CountQueuingStrategy {
constructor(options) {
defineProperty(this, 'highWaterMark', {
value: options.highWaterMark,
@@ -12,11 +12,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

Powered by Google App Engine
This is Rietveld 408576698