Status: New Owner: ---- New issue 239 by [email protected]: v8 implementation of [Array.prototype.lastIndexOf] handling [Undefined] types in comparison to mozillas current JavaScript version http://code.google.com/p/v8/issues/detail?id=239
hallo v8 developers, please could you countercheck on the issue of [Array.prototype.indexOf]/ [Array.prototype.lastIndexOf] and theirs handling of [Undefined] types if set or omitted as those methods arguments in comparison to mozillas current JavaScript version: short description: v8's current implementations of array methods [indexOf] / [lastIndexOf] do not seem to care about an omitted or even explicitly [undefined] set first argument whereas mozillas implementations do (even if currently possibly broken - https://bugzilla.mozilla.org/show_bug.cgi?id=480096) [2, 3,, 4, 5, 6].lastIndexOf(); // result: -1 // expected as is in gecko: 2 Array.prototype.lastIndexOf.call([2, 3,, 4, 5, 6]); // result: -1 // expected as is in gecko: 2 Array.prototype.lastIndexOf.apply([2, 3,, 4, 5, 6], [, -4]); // result: -1 // expected as is in gecko: 2 Array.prototype.lastIndexOf.apply([2, 3,, 4, 5, 6], [window.undefined]); // result: -1 // expected as is in gecko: 2 Array.prototype.lastIndexOf.apply([2, 3,, 4, 5, 6], [window.undefined, - 4]); // result: -1 // expected as is in gecko: 2 looking back onto [http://code.google.com/p/v8/issues/detail?id=218] who among you does stick closest to the specs in this special case? kind regards - Peter Seliger -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
