[Webkit-unassigned] [Bug 12963] New: Inconsistencies in JS array extras with Mozilla implementation
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Mar 4 02:11:43 PST 2007
http://bugs.webkit.org/show_bug.cgi?id=12963
Summary: Inconsistencies in JS array extras with Mozilla
implementation
Product: WebKit
Version: 522+ (nightly)
Platform: All
OS/Version: Mac OS X 10.4
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: jwalden+bwo at mit.edu
I recently made the effort to fully quantify the exact details of Mozilla's
support for its array extensions: some, every, forEach, map, filter, and
(lastI|i)ndexOf. Exact JavaScript definitions of these methods which fully
match the native Mozilla implementations are now posted on the Mozilla
Developer Center:
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:indexOf
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:lastIndexOf
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:some
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:filter
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:every
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:map
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:forEach
Safari's done a good job of matching the Mozilla implementations, for the most
part (including not replicating a bug Mozilla had up until the latest update).
I've found a couple things you do differently, tho, and I'm posting a patch for
them. (Feel free to compare against the above URLs for yourself as a
double-check for any other latent issues.) The issues discovered are as
follows:
- forEach returns this, not undefined
- all the methods should ignore holes, not treat them as undefined (I think
every/forEach/some already do this?)
I do not have a Mac and thus haven't tested the to-be-posted patch or the
current implementation's behavior.
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list