Commit ec519529 authored by Glenn Watson's avatar Glenn Watson Committed by Qt by Nokia
Browse files

Support JS Array.sort() function for sequence wrappers.


The V8 natve sort implementation calls some functions that are
incompatible with the way sequence wrappers work. In particular,
it calls an internal length() function which does not pass through
the length accessor provided by sequence wrappers, so the sort
function always thinks the array is zero length. Instead, clone the
array prototype and override the sort function with one that is
specific to sequence wrappers.

Task-number: QTBUG-25269
Change-Id: Ic83b9ee0bd3a0707e512f28057f0f99b432fded4
Reviewed-by: default avatarMatthew Vogt <matthew.vogt@nokia.com>
parent 8bb5677f
Showing with 250 additions and 4 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment