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

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

Issue 2499943002: WritableStream: minor bug fixes (Closed)
Patch Set: Combine conditions for invalid HWM exception Created 4 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
« no previous file with comments | « no previous file | 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/WritableStream.js
diff --git a/third_party/WebKit/Source/core/streams/WritableStream.js b/third_party/WebKit/Source/core/streams/WritableStream.js
index 5ffadd7e1d8967e09f4b723b892f7f2fd4b10993..7e132d97be788115a0ecd41e2de2afa710357c77 100644
--- a/third_party/WebKit/Source/core/streams/WritableStream.js
+++ b/third_party/WebKit/Source/core/streams/WritableStream.js
@@ -499,7 +499,7 @@
if (!IsWritableStream(stream)) {
throw new TypeError(errIllegalConstructor);
}
- if (stream[_controlledWritableStream] !== undefined) {
+ if (stream[_writableStreamController] !== undefined) {
throw new TypeError(errIllegalConstructor);
}
this[_controlledWritableStream] = stream;
@@ -791,10 +791,7 @@
}
highWaterMark = Number(highWaterMark);
- if (Number_isNaN(highWaterMark)) {
- throw new TypeError(errInvalidHWM);
- }
- if (highWaterMark < 0) {
+ if (Number_isNaN(highWaterMark) || highWaterMark < 0) {
throw new RangeError(errInvalidHWM);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698