Bug 109307 - [Qt] Function.prototype.apply doesn't accept non-Array arguments list
Summary: [Qt] Function.prototype.apply doesn't accept non-Array arguments list
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P3 Normal
Assignee: Nobody
Depends on:
Blocks: 110007
  Show dependency treegraph
Reported: 2013-02-08 09:16 PST by Richard Gibson
Modified: 2014-02-03 03:25 PST (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Richard Gibson 2013-02-08 09:16:17 PST
Per spec at http://es5.github.com/#x15.3.4.3 , Function.prototype.apply should accept as its second argument any object with a length property (used as an exclusive upper bound on numeric "indices"). http://bugs.jquery.com/ticket/13282 implies that QtWebKit does not, because passing a NodeList (e.g., from document.getElementsByTagName("a")) fails (confirmed with phantomjs 1.7).

In other words, the following expressions should return [0, 1]:
  (function(a, b){ return [a, b]; }).apply( null, { length: 2, 0: 0, 1: 1 } )
Comment 1 Jocelyn Turcotte 2014-02-03 03:25:03 PST
=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.