[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r12270: Don't return destroyed Displ
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r12270: Don't return destroyed DisplayObjects from the DisplayList. A |
Date: |
Wed, 23 Jun 2010 08:30:25 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 12270 [merge]
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Wed 2010-06-23 08:30:25 +0200
message:
Don't return destroyed DisplayObjects from the DisplayList. A
less-than-optimal fix for bug #28563. A better fix needs more investigation.
Test passes in misc-ming.all/ActionOrder{3,4,5}.swf and RegisterClass4.swf.
modified:
libcore/DisplayList.cpp
libcore/MovieClip.cpp
testsuite/misc-ming.all/ActionOrderTest3.c
testsuite/misc-ming.all/ActionOrderTest4.c
testsuite/misc-ming.all/ActionOrderTest5.c
testsuite/misc-ming.all/RegisterClassTest4.c
=== modified file 'libcore/DisplayList.cpp'
--- a/libcore/DisplayList.cpp 2010-06-18 08:44:46 +0000
+++ b/libcore/DisplayList.cpp 2010-06-23 06:12:47 +0000
@@ -110,6 +110,12 @@
bool operator() (const DisplayItem& item) {
assert (item);
+ // TODO: this is necessary because destroy() is called in
+ // movie_root, leaving destroyed items on the DisplayList. They
+ // shouldn't be found. A better fix would be to stop destroying
+ // objects there and add to the invariant that there are never
+ // destroyed DisplayObjects in the DisplayList.
+ if (item->isDestroyed()) return false;
return item->get_name() == _name;
}
@@ -125,6 +131,12 @@
bool operator() (const DisplayItem& item) {
assert (item);
+ // TODO: this is necessary because destroy() is called in
+ // movie_root, leaving destroyed items on the DisplayList. They
+ // shouldn't be found. A better fix would be to stop destroying
+ // objects there and add to the invariant that there are never
+ // destroyed DisplayObjects in the DisplayList.
+ if (item->isDestroyed()) return false;
return _noCaseEquals(item->get_name(), _name);
}
@@ -743,8 +755,10 @@
endIt = _charsByDepth.end(); it != endIt; ++it) {
const DisplayItem& dobj = *it;
- log_debug(_("Item %d at depth %d (char name %s, type %s)"),
- num, dobj->get_depth(), dobj->get_name(), typeName(*dobj));
+ log_debug(_("Item %d(%s) at depth %d (char name %s, type %s)"
+ "Destroyed: %s, unloaded: %s"),
+ num, dobj, dobj->get_depth(), dobj->get_name(), typeName(*dobj),
+ dobj->isDestroyed(), dobj->unloaded());
num++;
}
}
=== modified file 'libcore/MovieClip.cpp'
--- a/libcore/MovieClip.cpp 2010-06-19 09:55:35 +0000
+++ b/libcore/MovieClip.cpp 2010-06-23 06:12:47 +0000
@@ -888,6 +888,7 @@
void
MovieClip::restoreDisplayList(size_t tgtFrame)
{
+
// This is not tested as usable for jump-forwards (yet)...
// TODO: I guess just moving here the code currently in goto_frame
// for jump-forwards would do
=== modified file 'testsuite/misc-ming.all/ActionOrderTest3.c'
--- a/testsuite/misc-ming.all/ActionOrderTest3.c 2010-06-17 07:44:01
+0000
+++ b/testsuite/misc-ming.all/ActionOrderTest3.c 2010-06-22 14:44:58
+0000
@@ -161,24 +161,24 @@
check_equals(mo, "_global.arr[3]", "'dynamic load: 0'");
check_equals(mo, "_global.arr[4]", "'Frame 3 actions: undefined'");
check_equals(mo, "_global.arr[5]", "'Frame 2 actions: undefined'");
- xcheck_equals(mo, "_global.arr[6]", "'Frame 3 actions: 0'");
- xcheck_equals(mo, "_global.arr[7]", "'Frame 2 actions: 0'");
+ check_equals(mo, "_global.arr[6]", "'Frame 3 actions: 0'");
+ check_equals(mo, "_global.arr[7]", "'Frame 2 actions: 0'");
check_equals(mo, "_global.arr[8]", "'ctor: 1'");
check_equals(mo, "_global.arr[9]", "'static unload: 0'");
check_equals(mo, "_global.arr[10]", "'dynamic unload: 0'");
check_equals(mo, "_global.arr[11]", "'dynamic load: 1'");
check_equals(mo, "_global.arr[12]", "'Frame 3 actions: 0'");
check_equals(mo, "_global.arr[13]", "'Frame 2 actions: 0'");
- xcheck_equals(mo, "_global.arr[14]", "'Frame 3 actions: 1'");
- xcheck_equals(mo, "_global.arr[15]", "'Frame 2 actions: 1'");
+ check_equals(mo, "_global.arr[14]", "'Frame 3 actions: 1'");
+ check_equals(mo, "_global.arr[15]", "'Frame 2 actions: 1'");
check_equals(mo, "_global.arr[16]", "'ctor: 2'");
check_equals(mo, "_global.arr[17]", "'static unload: 1'");
check_equals(mo, "_global.arr[18]", "'dynamic unload: 1'");
check_equals(mo, "_global.arr[19]", "'dynamic load: 2'");
check_equals(mo, "_global.arr[20]", "'Frame 3 actions: 1'");
check_equals(mo, "_global.arr[21]", "'Frame 2 actions: 1'");
- xcheck_equals(mo, "_global.arr[22]", "'Frame 3 actions: 2'");
- xcheck_equals(mo, "_global.arr.toString()",
+ check_equals(mo, "_global.arr[22]", "'Frame 3 actions: 2'");
+ check_equals(mo, "_global.arr.toString()",
"'Frame 2 actions: undefined,ctor: 0,static unload:
undefined,dynamic load: 0,Frame 3 actions: undefined,Frame 2 actions:
undefined,Frame 3 actions: 0,Frame 2 actions: 0,ctor: 1,static unload:
0,dynamic unload: 0,dynamic load: 1,Frame 3 actions: 0,Frame 2 actions: 0,Frame
3 actions: 1,Frame 2 actions: 1,ctor: 2,static unload: 1,dynamic unload:
1,dynamic load: 2,Frame 3 actions: 1,Frame 2 actions: 1,Frame 3 actions: 2'");
SWFMovie_nextFrame(mo);
=== modified file 'testsuite/misc-ming.all/ActionOrderTest4.c'
--- a/testsuite/misc-ming.all/ActionOrderTest4.c 2010-06-17 11:36:16
+0000
+++ b/testsuite/misc-ming.all/ActionOrderTest4.c 2010-06-22 14:44:58
+0000
@@ -170,16 +170,16 @@
check_equals(mo, "_global.arr[12]", "'dynamic load: 1'");
check_equals(mo, "_global.arr[13]", "'Frame 3 actions: 0'");
check_equals(mo, "_global.arr[14]", "'Frame 2 actions: 0'");
- xcheck_equals(mo, "_global.arr[15]", "'Frame 3 actions: 1'");
- xcheck_equals(mo, "_global.arr[16]", "'Frame 2 actions: 1'");
+ check_equals(mo, "_global.arr[15]", "'Frame 3 actions: 1'");
+ check_equals(mo, "_global.arr[16]", "'Frame 2 actions: 1'");
check_equals(mo, "_global.arr[17]", "'ctor: 2'");
check_equals(mo, "_global.arr[18]", "'dynamic unload: 1'");
check_equals(mo, "_global.arr[19]", "'static load: 2'");
check_equals(mo, "_global.arr[20]", "'dynamic load: 2'");
check_equals(mo, "_global.arr[21]", "'Frame 3 actions: 1'");
check_equals(mo, "_global.arr[22]", "'Frame 2 actions: 1'");
- xcheck_equals(mo, "_global.arr[23]", "'Frame 3 actions: 2'");
- xcheck_equals(mo, "_global.arr.toString()", "'Frame 2 actions:
undefined,static load: undefined,ctor: 0,static load: 0,dynamic load: 0,Frame 3
actions: 0,Frame 2 actions: 0,Frame 3 actions: 0,Frame 2 actions: 0,ctor:
1,dynamic unload: 0,static load: 1,dynamic load: 1,Frame 3 actions: 0,Frame 2
actions: 0,Frame 3 actions: 1,Frame 2 actions: 1,ctor: 2,dynamic unload:
1,static load: 2,dynamic load: 2,Frame 3 actions: 1,Frame 2 actions: 1,Frame 3
actions: 2'");
+ check_equals(mo, "_global.arr[23]", "'Frame 3 actions: 2'");
+ check_equals(mo, "_global.arr.toString()", "'Frame 2 actions:
undefined,static load: undefined,ctor: 0,static load: 0,dynamic load: 0,Frame 3
actions: 0,Frame 2 actions: 0,Frame 3 actions: 0,Frame 2 actions: 0,ctor:
1,dynamic unload: 0,static load: 1,dynamic load: 1,Frame 3 actions: 0,Frame 2
actions: 0,Frame 3 actions: 1,Frame 2 actions: 1,ctor: 2,dynamic unload:
1,static load: 2,dynamic load: 2,Frame 3 actions: 1,Frame 2 actions: 1,Frame 3
actions: 2'");
SWFMovie_nextFrame(mo);
add_actions(mo, "totals(26); stop();");
=== modified file 'testsuite/misc-ming.all/ActionOrderTest5.c'
--- a/testsuite/misc-ming.all/ActionOrderTest5.c 2010-06-17 07:44:01
+0000
+++ b/testsuite/misc-ming.all/ActionOrderTest5.c 2010-06-22 14:44:58
+0000
@@ -158,14 +158,14 @@
check_equals(mo, "_global.arr[8]", "'dynamic unload: 0'");
xcheck_equals(mo, "_global.arr[9]", "'Frame 3 actions: 0'");
check_equals(mo, "_global.arr[11]", "'Frame 2 actions: 0'");
- xcheck_equals(mo, "_global.arr[12]", "'Frame 3 actions: 1'");
- xcheck_equals(mo, "_global.arr[13]", "'Frame 2 actions: 1'");
+ check_equals(mo, "_global.arr[12]", "'Frame 3 actions: 1'");
+ check_equals(mo, "_global.arr[13]", "'Frame 2 actions: 1'");
check_equals(mo, "_global.arr[14]", "'ctor: 2'");
check_equals(mo, "_global.arr[15]", "'dynamic unload: 1'");
xcheck_equals(mo, "_global.arr[16]", "'Frame 3 actions: 1'");
xcheck_equals(mo, "_global.arr[17]", "'dynamic load: 2'");
check_equals(mo, "_global.arr[18]", "'Frame 2 actions: 1'");
- xcheck_equals(mo, "_global.arr[19]", "'Frame 3 actions: 2'");
+ check_equals(mo, "_global.arr[19]", "'Frame 3 actions: 2'");
xcheck_equals(mo, "_global.arr.toString()",
"'Frame 2 actions: undefined,ctor: 0,Frame 3 actions:
0,dynamic load: 0,Frame 2 actions: 0,Frame 3 actions: 0,Frame 2 actions:
0,ctor: 1,dynamic unload: 0,Frame 3 actions: 0,dynamic load: 1,Frame 2 actions:
0,Frame 3 actions: 1,Frame 2 actions: 1,ctor: 2,dynamic unload: 1,Frame 3
actions: 1,dynamic load: 2,Frame 2 actions: 1,Frame 3 actions: 2'");
=== modified file 'testsuite/misc-ming.all/RegisterClassTest4.c'
--- a/testsuite/misc-ming.all/RegisterClassTest4.c 2010-06-17 13:46:37
+0000
+++ b/testsuite/misc-ming.all/RegisterClassTest4.c 2010-06-22 14:44:58
+0000
@@ -132,7 +132,7 @@
SWFMovie_nextFrame(mo);
check_equals(mo, "_global.real.length", "12");
- xcheck_equals(mo, "_global.real.toString()",
+ check_equals(mo, "_global.real.toString()",
"'undefined,0,0,0,0,0,0,1,1,1,1,2'");
check_equals(mo, "_global.fns.length", "12");
@@ -143,11 +143,11 @@
check_equals(mo, "_global.fns[4]", "'function'");
check_equals(mo, "_global.fns[5]", "'function'");
check_equals(mo, "_global.fns[6]", "'function'");
- xcheck_equals(mo, "_global.fns[7]", "'function'");
- xcheck_equals(mo, "_global.fns[8]", "'function'");
+ check_equals(mo, "_global.fns[7]", "'function'");
+ check_equals(mo, "_global.fns[8]", "'function'");
check_equals(mo, "_global.fns[9]", "'function'");
check_equals(mo, "_global.fns[10]", "'function'");
- xcheck_equals(mo, "_global.fns[11]", "'function'");
+ check_equals(mo, "_global.fns[11]", "'function'");
check_equals(mo, "_global.ctorcalls", "3");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r12270: Don't return destroyed DisplayObjects from the DisplayList. A,
Benjamin Wolsey <=