Title: [278710] trunk
- Revision
- 278710
- Author
- you...@apple.com
- Date
- 2021-06-10 10:06:06 -0700 (Thu, 10 Jun 2021)
Log Message
CountQueuingStrategy.constructor misses checking the type of init param
https://bugs.webkit.org/show_bug.cgi?id=226759
Reviewed by Chris Dumez.
LayoutTests/imported/w3c:
* web-platform-tests/streams/queuing-strategies.any-expected.txt:
* web-platform-tests/streams/queuing-strategies.any.worker-expected.txt:
Source/WebCore:
Now that streams are WebIDLed, add related parameter type checks.
Covered by rebased tests.
* Modules/streams/CountQueuingStrategy.js:
(initializeCountQueuingStrategy):
LayoutTests:
* streams/shadowing-defineProperty.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (278709 => 278710)
--- trunk/LayoutTests/ChangeLog 2021-06-10 17:02:23 UTC (rev 278709)
+++ trunk/LayoutTests/ChangeLog 2021-06-10 17:06:06 UTC (rev 278710)
@@ -1,3 +1,12 @@
+2021-06-10 Youenn Fablet <you...@apple.com>
+
+ CountQueuingStrategy.constructor misses checking the type of init param
+ https://bugs.webkit.org/show_bug.cgi?id=226759
+
+ Reviewed by Chris Dumez.
+
+ * streams/shadowing-defineProperty.html:
+
2021-06-10 Rob Buis <rb...@igalia.com>
Treat intrinsic like *-content
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (278709 => 278710)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-06-10 17:02:23 UTC (rev 278709)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-06-10 17:06:06 UTC (rev 278710)
@@ -1,5 +1,15 @@
2021-06-10 Youenn Fablet <you...@apple.com>
+ CountQueuingStrategy.constructor misses checking the type of init param
+ https://bugs.webkit.org/show_bug.cgi?id=226759
+
+ Reviewed by Chris Dumez.
+
+ * web-platform-tests/streams/queuing-strategies.any-expected.txt:
+ * web-platform-tests/streams/queuing-strategies.any.worker-expected.txt:
+
+2021-06-10 Youenn Fablet <you...@apple.com>
+
Update libwebrtc to M92
https://bugs.webkit.org/show_bug.cgi?id=226494
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/queuing-strategies.any-expected.txt (278709 => 278710)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/queuing-strategies.any-expected.txt 2021-06-10 17:02:23 UTC (rev 278709)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/queuing-strategies.any-expected.txt 2021-06-10 17:06:06 UTC (rev 278710)
@@ -1,7 +1,7 @@
PASS CountQueuingStrategy: Can construct a with a valid high water mark
-FAIL CountQueuingStrategy: Constructor behaves as expected with strange arguments assert_throws_js: construction fails with true function "() => new QueuingStrategy(true)" did not throw
-FAIL CountQueuingStrategy: highWaterMark constructor values are converted per the unrestricted double rules assert_equals: false gets set correctly expected (number) 0 but got (boolean) false
+PASS CountQueuingStrategy: Constructor behaves as expected with strange arguments
+PASS CountQueuingStrategy: highWaterMark constructor values are converted per the unrestricted double rules
PASS CountQueuingStrategy: size is the same function across all instances
PASS CountQueuingStrategy: size should have the right name
FAIL CountQueuingStrategy: subclassing should work correctly assert_equals: constructor.name should be correct expected "SubClass" but got "CountQueuingStrategy"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/queuing-strategies.any.worker-expected.txt (278709 => 278710)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/queuing-strategies.any.worker-expected.txt 2021-06-10 17:02:23 UTC (rev 278709)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/queuing-strategies.any.worker-expected.txt 2021-06-10 17:06:06 UTC (rev 278710)
@@ -1,7 +1,7 @@
PASS CountQueuingStrategy: Can construct a with a valid high water mark
-FAIL CountQueuingStrategy: Constructor behaves as expected with strange arguments assert_throws_js: construction fails with true function "() => new QueuingStrategy(true)" did not throw
-FAIL CountQueuingStrategy: highWaterMark constructor values are converted per the unrestricted double rules assert_equals: false gets set correctly expected (number) 0 but got (boolean) false
+PASS CountQueuingStrategy: Constructor behaves as expected with strange arguments
+PASS CountQueuingStrategy: highWaterMark constructor values are converted per the unrestricted double rules
PASS CountQueuingStrategy: size is the same function across all instances
PASS CountQueuingStrategy: size should have the right name
FAIL CountQueuingStrategy: subclassing should work correctly assert_equals: constructor.name should be correct expected "SubClass" but got "CountQueuingStrategy"
Modified: trunk/LayoutTests/streams/shadowing-defineProperty.html (278709 => 278710)
--- trunk/LayoutTests/streams/shadowing-defineProperty.html 2021-06-10 17:02:23 UTC (rev 278709)
+++ trunk/LayoutTests/streams/shadowing-defineProperty.html 2021-06-10 17:06:06 UTC (rev 278710)
@@ -11,8 +11,8 @@
throw "User overriden";
};
-new ByteLengthQueuingStrategy({});
-new CountQueuingStrategy({});
+new ByteLengthQueuingStrategy({highWaterMark:1});
+new CountQueuingStrategy({highWaterMark:1});
</script>
<script src=""
</body>
Modified: trunk/Source/WebCore/ChangeLog (278709 => 278710)
--- trunk/Source/WebCore/ChangeLog 2021-06-10 17:02:23 UTC (rev 278709)
+++ trunk/Source/WebCore/ChangeLog 2021-06-10 17:06:06 UTC (rev 278710)
@@ -1,3 +1,16 @@
+2021-06-10 Youenn Fablet <you...@apple.com>
+
+ CountQueuingStrategy.constructor misses checking the type of init param
+ https://bugs.webkit.org/show_bug.cgi?id=226759
+
+ Reviewed by Chris Dumez.
+
+ Now that streams are WebIDLed, add related parameter type checks.
+ Covered by rebased tests.
+
+ * Modules/streams/CountQueuingStrategy.js:
+ (initializeCountQueuingStrategy):
+
2021-06-10 Rob Buis <rb...@igalia.com>
Treat intrinsic like *-content
Modified: trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.js (278709 => 278710)
--- trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.js 2021-06-10 17:02:23 UTC (rev 278709)
+++ trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.js 2021-06-10 17:06:06 UTC (rev 278710)
@@ -34,8 +34,15 @@
{
"use strict";
+ if (!arguments.length || !@isObject(parameters))
+ @throwTypeError("CountQueuingStrategy constructor takes an object as first argument");
+
+ const highWaterMark = parameters.highWaterMark;
+ if (highWaterMark === @undefined)
+ @throwTypeError("Member QueuingStrategyInit.highWaterMark is required");
+
@Object.@defineProperty(this, "highWaterMark", {
- value: parameters.highWaterMark,
+ value: @toNumber(highWaterMark),
configurable: true,
enumerable: true,
writable: true
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes