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

Unified Diff: third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js

Issue 1378213002: Implement ByteLengthQueuingStrategy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test tweaks 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/streams/byte-length-queuing-strategy.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js
diff --git a/third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js b/third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js
new file mode 100644
index 0000000000000000000000000000000000000000..91584d7c3d48feea691d7e464265b9d8282f1451
--- /dev/null
+++ b/third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js
@@ -0,0 +1,26 @@
+(function(global, binding, v8) {
+ 'use strict';
+
+ const defineProperty = global.Object.defineProperty;
+
+ class ByteLengthQueuingStrategy {
+ constructor(options) {
+ defineProperty(this, 'highWaterMark', {
+ value: options.highWaterMark,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ }
+ size(chunk) {
+ return chunk.byteLength;
+ }
+ }
+
+ defineProperty(global, 'ByteLengthQueuingStrategy', {
+ value: ByteLengthQueuingStrategy,
+ enumerable: false,
+ configurable: true,
+ writable: true
tyoshino (SeeGerritForStatus) 2015/10/05 07:55:45 Could you teach me which part of the ECMA spec I s
+ });
+});
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/streams/byte-length-queuing-strategy.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698