[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/as_object.cpp testsuite/...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/as_object.cpp testsuite/... |
Date: |
Sat, 27 Oct 2007 10:53:44 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/10/27 10:53:44
Modified files:
. : ChangeLog
server : as_object.cpp
testsuite/actionscript.all: Global.as
Log message:
* testsuite/actionscript.all/Global.as: more tests about
invisible
flags over inherited getter-setters (most failures are for
SWF6
only)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4727&r2=1.4728
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.cpp?cvsroot=gnash&r1=1.74&r2=1.75
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Global.as?cvsroot=gnash&r1=1.32&r2=1.33
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4727
retrieving revision 1.4728
diff -u -b -r1.4727 -r1.4728
--- ChangeLog 27 Oct 2007 09:41:06 -0000 1.4727
+++ ChangeLog 27 Oct 2007 10:53:43 -0000 1.4728
@@ -1,5 +1,11 @@
2007-10-27 Sandro Santilli <address@hidden>
+ * testsuite/actionscript.all/Global.as: more tests about invisible
+ flags over inherited getter-setters (most failures are for SWF6
+ only)
+
+2007-10-27 Sandro Santilli <address@hidden>
+
* server/as_object.cpp (findUpdatableProperty): don't overlook
invisible properties in *this* object, it'll be eventually
overridden.
Index: server/as_object.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/as_object.cpp,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -b -r1.74 -r1.75
--- server/as_object.cpp 27 Oct 2007 09:41:06 -0000 1.74
+++ server/as_object.cpp 27 Oct 2007 10:53:44 -0000 1.75
@@ -219,7 +219,7 @@
// We won't scan the inheritance chain if we find a member,
// even if invisible.
//
- if ( prop ) return prop; // && prop->isVisible(swfVersion) ) return
prop;
+ if ( prop ) return prop;
// don't enter an infinite loop looking for __proto__ ...
if (key == NSV::PROP_uuPROTOuu) return NULL;
Index: testsuite/actionscript.all/Global.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Global.as,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- testsuite/actionscript.all/Global.as 27 Oct 2007 09:41:07 -0000
1.32
+++ testsuite/actionscript.all/Global.as 27 Oct 2007 10:53:44 -0000
1.33
@@ -21,7 +21,7 @@
// compile this test case with Ming makeswf, and then
// execute it like this gnash -1 -r 0 -v out.swf
-rcsid="$Id: Global.as,v 1.32 2007/10/27 09:41:07 strk Exp $";
+rcsid="$Id: Global.as,v 1.33 2007/10/27 10:53:44 strk Exp $";
#include "check.as"
@@ -125,6 +125,8 @@
function get() { return this.s; }
function set() { this.s++; }
+function get2() { return this.s2; }
+function set2() { this.s2++; }
#if OUTPUT_VERSION == 5
@@ -156,8 +158,9 @@
#if OUTPUT_VERSION == 6
- b = {}; b.addProperty("m", get, set);
- a = { m:1 }; a.__proto__ = b; a.s = 9;
+ c = {}; c.addProperty("m", get2, set2);
+ b = {}; b.addProperty("m", get, set); b.__proto__ = c;
+ a = { m:1 }; a.__proto__ = b; a.s = 9; a.s2 = 99;
check_equals(a.m, 1);
ASsetPropFlags(a, "m", 256);
check_equals(a.m, 9);
@@ -166,9 +169,18 @@
xcheck_equals(a.m, 2); // ignore flag was cleared
ASsetPropFlags(a, "m", 256);
check_equals(a.m, 9); // a own property was set instead
-
- b = {}; b.addProperty("m", get, set);
- a = { m:1 }; a.__proto__ = b; a.s = 9;
+ check(delete(a.m)); // delete a.m
+ ASsetPropFlags(b, "m", 256); // make b.m invisible
+ check_equals(a.m, 99); // b.m invisible, a.m non-existent
+ a.m=3; // will call b.m setter, even if invisible
+ xcheck_equals(a.s, 10); // b.m setter was called
+ xcheck_equals(a.m, 99); // ignore flag on inherited property was NOT
cleared
+ ASsetPropFlags(b, "m", 0, 256); // make b.m visible again
+ xcheck_equals(a.m, 10); // ignore flag was cleared
+
+ c = {}; c.addProperty("m", get2, set2);
+ b = {}; b.addProperty("m", get, set); b.__proto__ = c;
+ a = { m:1 }; a.__proto__ = b; a.s = 9; a.s2 = 99;
check_equals(a.m, 1);
ASsetPropFlags(a, "m", 1024);
check_equals(a.m, 9);
@@ -177,9 +189,18 @@
check_equals(a.m, 9); // ignore flag wasn't cleared
ASsetPropFlags(a, "m", 0, 1024);
check_equals(a.m, 2); // a own property was set instead
-
- b = {}; b.addProperty("m", get, set);
- a = { m:1 }; a.__proto__ = b; a.s = 9;
+ check(delete(a.m)); // delete a.m
+ ASsetPropFlags(b, "m", 1024); // make b.m invisible
+ check_equals(a.m, 99); // b.m invisible, a.m non-existent
+ a.m=3; // will call b.m setter, even if invisible
+ xcheck_equals(a.s, 10); // b.m setter was called
+ xcheck_equals(a.m, 99); // ignore flag on inherited property was NOT
cleared
+ ASsetPropFlags(b, "m", 0, 1024); // make b.m visible again
+ xcheck_equals(a.m, 10); // ignore flag was cleared
+
+ c = {}; c.addProperty("m", get2, set2);
+ b = {}; b.addProperty("m", get, set); b.__proto__ = c;
+ a = { m:1 }; a.__proto__ = b; a.s = 9; a.s2 = 99;
check_equals(a.m, 1);
ASsetPropFlags(a, "m", 4096);
check_equals(a.m, 9);
@@ -188,13 +209,23 @@
xcheck_equals(a.m, 2); // ignore flag was cleared
ASsetPropFlags(a, "m", 0, 4096);
check_equals(a.m, 2); // a own property was set instead
+ check(delete(a.m)); // delete a.m
+ ASsetPropFlags(b, "m", 4096); // make b.m invisible
+ check_equals(a.m, 99); // b.m invisible, a.m non-existent
+ a.m=3; // will call c.m setter, skipping invisible b.m one
+ check_equals(a.s, 9); // b.m setter was NOT called
+ check_equals(a.s2, 100); // c.m setter was called
+ check_equals(a.m, 100); // ignore flag on b.m getter-setter was NOT
cleared
+ ASsetPropFlags(b, "m", 0, 4096); // make b.m visible again
+ check_equals(a.m, 9); // ignore flag on b.m was NOT cleared
#endif // OUTPUT_VERSION == 6
#if OUTPUT_VERSION == 7
- b = {}; b.addProperty("m", get, set);
- a = { m:1 }; a.__proto__ = b; a.s = 9;
+ c = {}; c.addProperty("m", get2, set2);
+ b = {}; b.addProperty("m", get, set); b.__proto__ = c; b.s = 8; b.s2 =
88;
+ a = { m:1 }; a.__proto__ = b; a.s = 9; a.s2 = 99;
check_equals(a.m, 1);
ASSetPropFlags(a, "m", 4096);
check_equals(a.m, 9);
@@ -203,6 +234,17 @@
xcheck_equals(a.m, 2); // ignore flag was cleared
ASSetPropFlags(a, "m", 0, 4096);
check_equals(a.m, 2); // a own property was set instead
+ check(delete(a.m)); // delete a.m
+ check_equals(b.m, 8); // ???
+ ASsetPropFlags(b, "m", 4096); // make b.m invisible (no-op in SWF7 ?)
+ check_equals(b.m, 8); // b.m getter, altought invisible, is still
invoked as a getter
+ check_equals(a.m, 9); // b.m, altought invisible, is still invoked as a
getter
+ a.m=3; // ??
+ check_equals(a.s, 10); // b.m, altought invisible, is still invoked as
a setter
+ check_equals(a.s2, 99); // c.m is never reached (b.m was called)
+ check_equals(a.m, 10); // b.m getter, altoguth invisible, is used
+ ASsetPropFlags(b, "m", 0, 4096); // make b.m visible again (looks like
it wasn't really invisible before)
+ check_equals(a.m, 10); // ??
#endif // OUTPUT_VERSION == 7
@@ -215,10 +257,10 @@
check_totals(43); // SWF5
#else
# if OUTPUT_VERSION == 6
- check_totals(59); // SWF6
+ check_totals(75); // SWF6
# else
# if OUTPUT_VERSION == 7
- check_totals(49); // SWF7
+ check_totals(57); // SWF7
# else
check_totals(44); // SWF8+
# endif