CustomEvent.length incorrect
Reported by
andyearn...@gmail.com,
May 23 2016
|
||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2739.2 Safari/537.36 Steps to reproduce the problem: 1. Open dev tools on any page, e.g. about:blank 2. Enter `CustomEvent.length`, observe the result is 0 3. Enter `new CustomEvent()`, observe the error message stating at least one argument is required What is the expected behavior? According to the HTML spec, `CustomEvent` has one required argument. Therefore, `CustomEvent.length` should equal 1. What went wrong? The value of `CustomEvent.length` is 0 instead of 1. Did this work before? Yes Not sure Chrome version: 52.0.2739.2 Channel: dev OS Version: OS X 10.11.4 Flash Version: Shockwave Flash 22.0 r0 I'm almost certain this used to work because I remember writing a polyfill for the constructor that tested `CustomEvent.length === 0` before applying the polyfill.
,
May 26 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/01fcbfb8573898b017ef81c7d37dc871f8d19309 commit 01fcbfb8573898b017ef81c7d37dc871f8d19309 Author: bashi <bashi@chromium.org> Date: Thu May 26 07:41:26 2016 Use correct signature for custom constructor of CustomEvent This will make CustomEvent.length return the correct value (which is "1"). BUG= 614036 Review-Url: https://codereview.chromium.org/2015673003 Cr-Commit-Position: refs/heads/master@{#396143} [modify] https://crrev.com/01fcbfb8573898b017ef81c7d37dc871f8d19309/third_party/WebKit/LayoutTests/fast/js/constructor-length-expected.txt [modify] https://crrev.com/01fcbfb8573898b017ef81c7d37dc871f8d19309/third_party/WebKit/LayoutTests/fast/js/constructor-length.html [modify] https://crrev.com/01fcbfb8573898b017ef81c7d37dc871f8d19309/third_party/WebKit/LayoutTests/imported/wpt/dom/interfaces-expected.txt [modify] https://crrev.com/01fcbfb8573898b017ef81c7d37dc871f8d19309/third_party/WebKit/Source/core/events/CustomEvent.idl
,
May 26 2016
Thanks for the report! Fix has landed.
,
May 26 2016
Thanks for the super-fast turnaround :-) |
||
►
Sign in to add a comment |
||
Comment 1 by ajha@chromium.org
, May 24 2016Components: Blink>Bindings
Labels: -Pri-2 M-53 hasbisect OS-Linux OS-Windows Pri-1
Owner: bashi@chromium.org
Status: Assigned (was: Unconfirmed)