[Webkit-unassigned] [Bug 226725] New: MouseEvent.constructor misses checking if the param value is non-infinite or not
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 7 04:47:08 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=226725
Bug ID: 226725
Summary: MouseEvent.constructor misses checking if the param
value is non-infinite or not
Product: WebKit
Version: WebKit Local Build
Hardware: Unspecified
OS: Linux
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit Misc.
Assignee: webkit-unassigned at lists.webkit.org
Reporter: zyscoder at gmail.com
Steps to reproduce:
(1) Open a tab and navigate to any URL;
(2) Run the following code in the Console of Devtools:
```
new MouseEvent('',{screenX: NaN});
```
(3) This code would be evaluated successfully without any exceptions thrown.
Actual results:
This code would be evaluated successfully without any exceptions thrown.
Expected results:
In Chome, this code would throw an exception: `Uncaught TypeError: Failed to construct 'MouseEvent': The provided double value is non-finite.`.
It seems reasonable to throw such an exception since the type of the screenX param is double.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210607/ebd2761c/attachment.htm>
More information about the webkit-unassigned
mailing list