gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, bug32521, created. release_0_8_9_star


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, bug32521, created. release_0_8_9_start-263-g5ad6c4a
Date: Sat, 12 Mar 2011 23:22:31 +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, bug32521 has been created
        at  5ad6c4a33306f715c22f54bc5318a3a8ace6c38b (commit)

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=5ad6c4a33306f715c22f54bc5318a3a8ace6c38b


commit 5ad6c4a33306f715c22f54bc5318a3a8ace6c38b
Author: Sandro Santilli <address@hidden>
Date:   Sun Mar 13 00:21:43 2011 +0100

    Reduce script limit timeout to 4 seconds (from 40) and loop once more with 
actions dumped before throwing. Should help debugging our bug.

diff --git a/libcore/vm/ActionExec.cpp b/libcore/vm/ActionExec.cpp
index e5258d7..f47278f 100644
--- a/libcore/vm/ActionExec.cpp
+++ b/libcore/vm/ActionExec.cpp
@@ -167,11 +167,13 @@ ActionExec::operator()()
     // 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;
+    const size_t maxTime = 40 * 100;
     SystemClock clock;
 
     try {
 
+        bool hitLimit = false;
+        bool oldActionDump;
         // We might not stop at stop_pc, if we are trying.
         while (1) {
 
@@ -297,8 +299,15 @@ 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;
-                    throw ActionLimitException(fmt.str());
+                    if ( hitLimit ) {
+                        
LogFile::getDefaultInstance().setActionDump(oldActionDump);
+                        boost::format fmt = boost::format(_("Time exceeded 
while executing code in %1% between pc %2% and %3%")) % 
code.getMovieDefinition().get_url() % next_pc % pc;
+                        throw ActionLimitException(fmt.str());
+                    } else {
+                        oldActionDump = 
LogFile::getDefaultInstance().getActionDump();
+                        LogFile::getDefaultInstance().setActionDump(true);
+                        hitLimit = true; // we'll run one more time to debug
+                    }
                 }
                 // TODO: Run garbage collector ? If stack isn't too big ?
             }

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


hooks/post-receive
-- 
Gnash



reply via email to

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