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. release_0_8_9_start-


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-426-g4250f74
Date: Tue, 29 Mar 2011 21:36:24 +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  4250f74aa729f436becf092523d85b42590677eb (commit)
      from  d5a30e0ec319deac2670db8483e708f02b6e4c75 (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=4250f74aa729f436becf092523d85b42590677eb


commit 4250f74aa729f436becf092523d85b42590677eb
Author: Sandro Santilli <address@hidden>
Date:   Tue Mar 29 23:32:32 2011 +0200

    Query movie_root for action execution timeout configuration.

diff --git a/libcore/movie_root.cpp b/libcore/movie_root.cpp
index 3253bf2..c1b8776 100644
--- a/libcore/movie_root.cpp
+++ b/libcore/movie_root.cpp
@@ -164,6 +164,7 @@ movie_root::movie_root(const movie_definition& def,
     _scaleMode(SCALEMODE_SHOWALL),
     _displayState(DISPLAYSTATE_NORMAL),
     _recursionLimit(256),
+    // TODO: allow gnashrc to set this
     _timeoutLimit(15),
     _movieAdvancementDelay(83), // ~12 fps by default
     _lastMovieAdvancement(0),
diff --git a/libcore/vm/ActionExec.cpp b/libcore/vm/ActionExec.cpp
index 777532a..86b3861 100644
--- a/libcore/vm/ActionExec.cpp
+++ b/libcore/vm/ActionExec.cpp
@@ -165,11 +165,8 @@ ActionExec::operator()()
     // code. There may be no catch and/or finally block, but certain operations
     // must still be carried out. 
 
-    // TODO: set this in gnashrc.
-    // NOTE: According to http://www.gnashdev.org/wiki/index.php/ScriptLimits
-    //       this should be 15, not 40, seconds
-    const size_t maxTime = 40 * 1000;
-    SystemClock clock;
+    const size_t maxTime = getRoot(vm).getTimeoutLimit() * 1000;
+    SystemClock clock; // TODO: should we use a CPUClock here ?
 
     try {
 
@@ -298,7 +295,7 @@ ActionExec::operator()()
                 // Check for script limits hit. 
                 // See: http://www.gnashdev.org/wiki/index.php/ScriptLimits
                 if (clock.elapsed() > maxTime) {
-                    boost::format fmt = boost::format(_("Time exceeded while 
executing code in %1% between pc %2% and %3%")) % 
code.getMovieDefinition().get_url() % next_pc % pc;
+                    boost::format fmt = boost::format(_("Time exceeded (%4% 
secs) while executing code in %1% between pc %2% and %3%")) % 
code.getMovieDefinition().get_url() % next_pc % pc % (maxTime/1000);
                     throw ActionLimitException(fmt.str());
                 }
                 // TODO: Run garbage collector ? If stack isn't too big ?

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

Summary of changes:
 libcore/movie_root.cpp    |    1 +
 libcore/vm/ActionExec.cpp |    9 +++------
 2 files changed, 4 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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