[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/asobj/MovieClipLoader.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/asobj/MovieClipLoader.cpp |
Date: |
Thu, 14 Feb 2008 21:55:25 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/02/14 21:55:25
Modified files:
. : ChangeLog
server/asobj : MovieClipLoader.cpp
Log message:
(loadClip): fetch bytes loaded/total from the loaded clip,
not the replaced one.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5656&r2=1.5657
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/MovieClipLoader.cpp?cvsroot=gnash&r1=1.47&r2=1.48
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5656
retrieving revision 1.5657
diff -u -b -r1.5656 -r1.5657
--- ChangeLog 14 Feb 2008 21:10:16 -0000 1.5656
+++ ChangeLog 14 Feb 2008 21:55:24 -0000 1.5657
@@ -1,5 +1,7 @@
2008-02-14 Sandro Santilli <address@hidden>
+ * server/asobj/MovieClipLoader.cpp (loadClip): fetch bytes
+ loaded/total from the loaded clip, not the replaced one.
* server/as_value.cpp (to_string): movieclips oughta evaluate
to the empty string only if dangling and not rebound.
* testsuite/actionscript.all/MovieClipLoader.as: test that rebound
Index: server/asobj/MovieClipLoader.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/MovieClipLoader.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- server/asobj/MovieClipLoader.cpp 12 Feb 2008 14:43:26 -0000 1.47
+++ server/asobj/MovieClipLoader.cpp 14 Feb 2008 21:55:25 -0000 1.48
@@ -214,12 +214,20 @@
return false;
}
+ sprite_instance* newChar = targetVal.to_sprite(); // this is to resolve
the soft ref
+ if ( ! newChar )
+ {
+ // We could assert, but let's try to be nicer...
+ log_error("sprite_instance::loadMovie destroyed self w/out
replacing ?");
+ return false;
+ }
+
// Dispatch onLoadStart
callMethod(NSV::PROP_BROADCAST_MESSAGE, as_value("onLoadStart"),
targetVal);
// Dispatch onLoadProgress
- size_t bytesLoaded = target.get_bytes_loaded();
- size_t bytesTotal = target.get_bytes_total();
+ size_t bytesLoaded = newChar->get_bytes_loaded();
+ size_t bytesTotal = newChar->get_bytes_total();
callMethod(NSV::PROP_BROADCAST_MESSAGE, as_value("onLoadProgress"),
targetVal,
bytesLoaded, bytesTotal);