[Webkit-unassigned] [Bug 80797] Argument length limited to 65536

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 12 05:37:37 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=80797





--- Comment #2 from Matt <matt at assanka.net>  2012-03-12 05:37:36 PST ---
Thank you for explaining. There is a web compatibility concern in that many developers seem to have written implementations of `pack` or other utilities that perform binary operations that rely on `String.fromCharCode.apply` to perform the final transformation, because in some test cases it's faster than calling it on every iteration of a per-character loop.

See for example:

http://stackoverflow.com/questions/3195865/javascript-html-converting-byte-array-to-string
http://codereview.stackexchange.com/questions/3569/pack-and-unpack-bytes-to-strings
http://stackoverflow.com/questions/5636812/sorting-strings-in-reverse-order-with-backbone-js/5639070

It seems like this won't be trivial to fix in JavaScriptCore, and I understand why it's actually better to have a hard limit than allow developers to write code that performs badly. So perhaps it would be better to warn web developers of this issue at least for now. A warning has been added to Mozilla's docs at https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/apply.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list