Inaccurate check if object is an array in extensions::event_bindings
Reported by
a.v.iats...@gmail.com,
Dec 13 2016
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 Steps to reproduce the problem: 1. (In an extension) Add a function to the background page that calls chrome.webNavigation.onDOMContentLoaded.addListener() with the url parameter set to the argument passed to the function 2. Add something that calls the background page function with an array of urls What is the expected behavior? Replace this check --- if (filters.url && !(filters.url instanceof Array)) to this one +++ if (filters.url && !(Array.isArray(filters.url)) What went wrong? The check `!(filters.url instanceof Array)` inside EventImpl.prototype.addListener() method works correctly only if `filters.url` is an array created by that page's original Array constructor. WebStore page: Did this work before? N/A Chrome version: 55.0.2883.87 Channel: stable OS Version: Flash Version: Shockwave Flash 24.0 r0 I've created an example extension to help in locating the issue.
,
Dec 14 2016
,
Dec 15 2016
Thanks for the report! In the somewhat-near term we're hoping to move away from the js custom bindings we have today, but this is easy enough to fix that it makes sense to do in the meantime. |
|||
►
Sign in to add a comment |
|||
Comment 1 by pbomm...@chromium.org
, Dec 13 2016Labels: M-55