gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r11691: Add code to mark stack and c


From: Sandro Santilli
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11691: Add code to mark stack and call stack reachable rather than expecting them to be empty if a compile-time macro is set (defaults to off)
Date: Sun, 13 Dec 2009 21:25:51 +0100
User-agent: Bazaar (2.0.2)

------------------------------------------------------------
revno: 11691
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Sun 2009-12-13 21:25:51 +0100
message:
  Add code to mark stack and call stack reachable rather than expecting them to 
be empty if a compile-time macro is set (defaults to off)
modified:
  libcore/as_environment.cpp
=== modified file 'libcore/as_environment.cpp'
--- a/libcore/as_environment.cpp        2009-12-04 09:20:14 +0000
+++ b/libcore/as_environment.cpp        2009-12-13 20:25:51 +0000
@@ -985,8 +985,24 @@
     if (m_target) m_target->setReachable();
     if (_original_target) _original_target->setReachable();
 
+#ifdef ALLOW_GC_RUN_DURING_ACTIONS_EXECUTION
+    /// Mark all (including unreachable) stack elements
+    for (SafeStack<as_value>::StackSize i=0, n=_stack.totalSize(); i<n; ++i)
+    {
+        _stack.at(i).setReachable();
+    }
+
+    /// Mark call stack 
+    for (CallStack::size_type i=0, n=_localFrames.size(); i<n; ++i)
+    {
+        _localFrames[i].markReachableResources();
+    }
+
+#else
     assert (_localFrames.empty());
     assert (_stack.empty());
+#endif
+
 }
 #endif // GNASH_USE_GC
 


reply via email to

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