gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. 003dc38e09b6e28dbebb


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. 003dc38e09b6e28dbebb8eb264456ee19e13d33a
Date: Fri, 01 Oct 2010 10:26:38 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  003dc38e09b6e28dbebb8eb264456ee19e13d33a (commit)
       via  3f60c53dd3315ddb43d93d7018a6a49c20b6ff46 (commit)
       via  9dcbfe1879e6e8244b9c0375a94ed169d8b9fa77 (commit)
      from  109b29aafedd04a2ec147fcbd5554bb2dd4a9520 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=003dc38e09b6e28dbebb8eb264456ee19e13d33a


commit 003dc38e09b6e28dbebb8eb264456ee19e13d33a
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Oct 1 12:03:54 2010 +0200

    Update comment.

diff --git a/libcore/asobj/Array_as.cpp b/libcore/asobj/Array_as.cpp
index b22e5ba..1abd0c2 100644
--- a/libcore/asobj/Array_as.cpp
+++ b/libcore/asobj/Array_as.cpp
@@ -836,7 +836,7 @@ checkArrayLength(as_object& array, const ObjectURI& uri, 
const as_value& val)
 size_t
 arrayLength(as_object& array)
 {
-    // TODO: check whether this should use only ownProperty.
+    // Only the length property of the array object itself counts.
     const as_value& length = getOwnProperty(array, NSV::PROP_LENGTH);
     if (length.is_undefined()) return 0;
     

http://git.savannah.gnu.org/cgit//commit/?id=3f60c53dd3315ddb43d93d7018a6a49c20b6ff46


commit 3f60c53dd3315ddb43d93d7018a6a49c20b6ff46
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Oct 1 12:02:36 2010 +0200

    Fix length lookup.

diff --git a/libcore/asobj/Array_as.cpp b/libcore/asobj/Array_as.cpp
index 31fb5ad..b22e5ba 100644
--- a/libcore/asobj/Array_as.cpp
+++ b/libcore/asobj/Array_as.cpp
@@ -837,8 +837,8 @@ size_t
 arrayLength(as_object& array)
 {
     // TODO: check whether this should use only ownProperty.
-    as_value length;
-    if (!array.get_member(NSV::PROP_LENGTH, &length)) return 0;
+    const as_value& length = getOwnProperty(array, NSV::PROP_LENGTH);
+    if (length.is_undefined()) return 0;
     
     const int size = toInt(length);
     if (size < 0) return 0;

http://git.savannah.gnu.org/cgit//commit/?id=9dcbfe1879e6e8244b9c0375a94ed169d8b9fa77


commit 9dcbfe1879e6e8244b9c0375a94ed169d8b9fa77
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Oct 1 12:02:15 2010 +0200

    Add tests for length property lookup.

diff --git a/testsuite/actionscript.all/array.as 
b/testsuite/actionscript.all/array.as
index 120b274..02897ba 100644
--- a/testsuite/actionscript.all/array.as
+++ b/testsuite/actionscript.all/array.as
@@ -1652,6 +1652,34 @@ check_equals(rs, 1);
 t.reverse();
 check_equals(rs, 1);
 
+// Check length property (not resolved).
+
+rescount = 0;
+
+t = {};
+p = {};
+t.__resolve = function(a) { ++rescount; return "resolved " + a; };
+t.__proto__ = p;
+
+t[0] = "zero";
+t[1] = "one";
+t[2] = "two";
+
+t.sort = Array.prototype.sort;
+t.toString = Array.prototype.toString;
+
+ret = "" + t.sort();
+check_equals(rescount, 0);
+check_equals(ret, "");
+
+// Check that length lookup doesn't recurse to prototype.
+
+p.length = 4;
+
+ret = "" + t.sort();
+check_equals(rescount, 0);
+check_equals(ret, "");
+
 #if OUTPUT_VERSION > 5
 
 Empty = function() {};
@@ -1757,11 +1785,11 @@ check_equals(ar.__proto__, "string");
 
 
 #if OUTPUT_VERSION < 6
- check_totals(545);
+ check_totals(549);
 #else
 # if OUTPUT_VERSION < 7
-  check_totals(629);
+  check_totals(633);
 # else
-  check_totals(639);
+  check_totals(643);
 # endif
 #endif

-----------------------------------------------------------------------

Summary of changes:
 libcore/asobj/Array_as.cpp          |    6 +++---
 testsuite/actionscript.all/array.as |   34 +++++++++++++++++++++++++++++++---
 2 files changed, 34 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]