ServiceWorker wrong Cache's methods arguments length
Reported by
nekr.fab...@gmail.com,
Feb 29 2016
|
|||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
Example URL:
Steps to reproduce the problem:
Run this in SW console:
caches.open('test').then(function(cache) {
var test = {
'match.length': cache.match.length,
'matchAll.length': cache.matchAll.length,
'keys.length': cache.keys.length,
'delete.length': cache.delete.length,
};
console.dir(test);
});
What is the expected behavior?
It should be something like this:
delete.length: 1
keys.length: 0
match.length: 1
matchAll.length: 0
This is that Firefox has and that other APIs have.
What went wrong?
It is:
delete.length: 2
keys.length: 2
match.length: 2
matchAll.length: 2
Did this work before? No
Chrome version: 48.0.2564.116 Channel: n/a
OS Version: OS X 10.11.3
Flash Version: Shockwave Flash 20.0 r0
Canary same as Stable
,
Mar 1 2016
Function's length should reflect only mandatory params, this is how built-in JS functions works (explicitly defined in spec). But if you are saying that all API in Chrome works in a way as in SW -- length reflects all arguments, not only mandatory. Then it's indeed not a bug.
,
Mar 1 2016
Unable to reproduce the issue on Windows 7, Mac 10.10.5, Ubuntu 14.04 using 48.0.2564.116, latest canary 51.0.2663.0 with below steps: 1.Run the given code in dev tools->console. 2.Observed that the output displayed as below: delete.length: 1 keys.length: 0 match.length: 1 matchAll.length: 0 Please find attached screenshot. nekr.fabula@Could you please check the issue on clean profile and update the thread if issue still persists.
,
Mar 1 2016
@ssamanoori, yes, sorry, it's my bad, I was modifying some function for polyfill and forgot to turn it off before testing. Could be closed.
,
Mar 1 2016
Thanks for following up. Closing.
,
Sep 30 2016
,
Sep 30 2016
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by mattm@chromium.org
, Mar 1 2016