Index: third_party/WebKit/Source/core/streams/CountQueuingStrategy.js |
diff --git a/third_party/WebKit/Source/core/streams/CountQueuingStrategy.js b/third_party/WebKit/Source/core/streams/CountQueuingStrategy.js |
index 61567c899512697bcc2a8ce65b931282974f0661..36141b74d34b905f05c91f912c67cd2ffc93b22b 100644 |
--- a/third_party/WebKit/Source/core/streams/CountQueuingStrategy.js |
+++ b/third_party/WebKit/Source/core/streams/CountQueuingStrategy.js |
@@ -16,6 +16,7 @@ |
writable: true |
}); |
} |
+ |
size(chunk) { return 1; } |
} |
@@ -25,4 +26,17 @@ |
configurable: true, |
writable: true |
}); |
+ |
+ // Export a separate copy that doesn't need options objects and can't be |
+ // interfered with. |
+ class BuiltInCountQueuingStrategy { |
+ constructor(highWaterMark) { |
+ defineProperty(this, 'highWaterMark', {value: highWaterMark}); |
+ } |
+ |
+ size(chunk) { return 1; } |
+ } |
+ |
+ binding.createBuiltInCountQueuingStrategy = highWaterMark => |
+ new BuiltInCountQueuingStrategy(highWaterMark); |
}); |