projects
/
platform
/
upstream
/
qtdeclarative.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9897c5a
)
Implement Array.prototype.sort
author
Roberto Raggi
<roberto.raggi@nokia.com>
Mon, 21 May 2012 12:11:12 +0000
(14:11 +0200)
committer
Roberto Raggi
<roberto.raggi@nokia.com>
Mon, 21 May 2012 12:11:12 +0000
(14:11 +0200)
qv4ecmaobjects.cpp
patch
|
blob
|
history
diff --git
a/qv4ecmaobjects.cpp
b/qv4ecmaobjects.cpp
index
daee5e9
..
a6e9239
100644
(file)
--- a/
qv4ecmaobjects.cpp
+++ b/
qv4ecmaobjects.cpp
@@
-1318,7
+1318,10
@@
void ArrayPrototype::method_slice(Context *ctx)
void ArrayPrototype::method_sort(Context *ctx)
{
Value self = ctx->thisObject;
+ Value comparefn = ctx->argument(0);
if (ArrayObject *instance = self.asArrayObject()) {
+ instance->value.sort(ctx, comparefn);
+ ctx->result = ctx->thisObject;
} else {
assert(!"generic implementation of Array.prototype.sort");
}