WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
226759
CountQueuingStrategy.constructor misses checking the type of init param
https://bugs.webkit.org/show_bug.cgi?id=226759
Summary
CountQueuingStrategy.constructor misses checking the type of init param
zyscoder@gmail.com
Reported
2021-06-07 23:27:42 PDT
Steps to reproduce: (1) Open a tab and navigate to any URL; (2) Run the following code in the Console of Devtools: ``` new CountQueuingStrategy('any'); ``` (3) Then this code would be evaluated successfully without throwing any exceptions. Actual results: Then this code would be evaluated successfully without throwing any exceptions. Expected results: As
https://streams.spec.whatwg.org/#cqs-constructor
says, the init param is of {highWaterMark: double} type. Webkit should throw a TypeError exception when evaluating this code. In my test, Chrome and Firefox throw exceptions: Chrome: `TypeError: Failed to construct 'CountQueuingStrategy': cannot convert to dictionary` Firefox: `'highWaterMark' must not be undefined.`
Attachments
Patch
(6.60 KB, patch)
2021-06-09 01:54 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(6.55 KB, patch)
2021-06-10 01:36 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2021-06-09 01:54:17 PDT
Created
attachment 430947
[details]
Patch
Chris Dumez
Comment 2
2021-06-09 08:32:23 PDT
Comment on
attachment 430947
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=430947&action=review
> Source/WebCore/Modules/streams/CountQueuingStrategy.js:44 > + value: @toNumber(parameters.highWaterMark),
Likely not a good idea to access parameters.highWaterMark twice as it is web observable and it could return different values for each call. I think it'd be better to cache the result of parameters.highWaterMark.
youenn fablet
Comment 3
2021-06-10 01:36:29 PDT
Created
attachment 431053
[details]
Patch
youenn fablet
Comment 4
2021-06-10 05:51:07 PDT
Comment on
attachment 431053
[details]
Patch AS debug wk2 error is unrelated
EWS
Comment 5
2021-06-10 10:06:12 PDT
Committed
r278710
(
238678@main
): <
https://commits.webkit.org/238678@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 431053
[details]
.
Radar WebKit Bug Importer
Comment 6
2021-06-10 10:07:18 PDT
<
rdar://problem/79145929
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug