[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r9543: Catch actionlimits exception
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r9543: Catch actionlimits exception thrown in executeTimers. |
Date: |
Tue, 29 Jul 2008 21:32:31 +0200 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9543
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Tue 2008-07-29 21:32:31 +0200
message:
Catch actionlimits exception thrown in executeTimers.
modified:
libcore/movie_root.cpp
------------------------------------------------------------
revno: 9516.1.14
committer: Benjamin Wolsey <address@hidden>
branch nick: workingcopy
timestamp: Mon 2008-07-28 23:44:24 +0200
message:
Move ActionLimitsException handling to movie_root::advance so that it
catches
callMethod exceptions (from executeTimers()).
modified:
libcore/movie_root.cpp
=== modified file 'libcore/movie_root.cpp'
--- a/libcore/movie_root.cpp 2008-07-15 16:45:32 +0000
+++ b/libcore/movie_root.cpp 2008-07-28 21:44:24 +0000
@@ -129,7 +129,7 @@
void
movie_root::disableScripts()
{
- _disableScripts=true;
+ _disableScripts = true;
// NOTE: we won't clear the action queue now
// to avoid invalidating iterators as we've
@@ -1064,21 +1064,34 @@
VM& vm = VM::get(); // TODO: cache it !
unsigned int now = vm.getTime();
- if ( (now - _lastMovieAdvancement) >= _movieAdvancementDelay )
- {
- advanceMovie();
- // setting to 'now' discards time spent on actual rendering and
- // action processing.
- // if rendering and action processing takes too much time
- // we'll always be late here, so FPS will effectively be
- // slower. Might add a check here allowing a tolerance
- // and printing a warnign when we're later then tolerated...
- //
- _lastMovieAdvancement = now; // or vm.getTime(); ?
+ try {
+
+ if ( (now - _lastMovieAdvancement) >= _movieAdvancementDelay )
+ {
+ advanceMovie();
+ // setting to 'now' discards time spent on actual rendering
and
+ // action processing.
+ // if rendering and action processing takes too much time
+ // we'll always be late here, so FPS will effectively be
+ // slower. Might add a check here allowing a tolerance
+ // and printing a warnign when we're later then tolerated...
+ //
+ _lastMovieAdvancement = now; // or vm.getTime(); ?
+ }
+
+ // TODO: execute timers ?
+ executeTimers();
}
+ catch (ActionLimitException& al)
+ {
+ //log_error(_("ActionLimits hit during advance: %s. Disabling
scripts"), al.what());
+ //disableScripts();
- // TODO: execute timers ?
- executeTimers();
+ // The PP does not disable scripts when the stack limit is reached,
+ // but rather struggles on.
+ log_error(_("Action limit hit during advance: %s."), al.what());
+ clearActionQueue();
+ }
}
void
@@ -1089,9 +1102,6 @@
// Do mouse drag, if needed
doMouseDrag();
- try
- {
-
// Advance all non-unloaded characters in the LiveChars list
// in reverse order (last added, first advanced)
// NOTE: can throw ActionLimitException
@@ -1110,18 +1120,6 @@
// NOTE: can throw ActionLimitException
processActionQueue();
- }
- catch (ActionLimitException& al)
- {
- //log_error(_("ActionLimits hit during advance: %s. Disabling
scripts"), al.what());
- //disableScripts();
-
- // The PP does not disable scripts when the stack limit is reached,
- // but rather struggles on.
- log_error(_("Action limit hit during advance: %s."), al.what());
- clearActionQueue();
- }
-
cleanupAndCollect();
assert(testInvariant());
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r9543: Catch actionlimits exception thrown in executeTimers.,
Benjamin Wolsey <=