-
Notifications
You must be signed in to change notification settings - Fork 45
Description
In the file
https://github.com/MailOnline/VPAIDHTML5Client/blob/master/js/VPAIDAdUnit.js
line 65-69
...
var ariaty = IVPAIDAdUnit.prototype[method].length;
// TODO avoid leaking arguments
// https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
var args = Array.prototype.slice.call(arguments);
var callback = (ariaty === args.length) ? args.pop() : undefined;
...
if my application use google closure compiler in ADVANCED mode (and offcource i'm sure i marked this file as extern), the value of ariaty always is 0. This makes the handshakeVersion cannot do the callback, so that the timeout occurs, then my application will get fail.
So, do you have any recommendations to use closure compiler correctly without this error?
Or would you change to use another way to avoid leaking-arguments?
I see that the IVPAIDAdUnit.prototype[method] always is function () {}, so the call IVPAIDAdUnit.prototype[method].length always is 0. In case of handshakeVersion, the IVPAIDAdUnit.prototype[method] should be function (version, callback) {}
Thank you!