gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r11712: Other places which would nee


From: Sandro Santilli
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11712: Other places which would need to handle eventual runs of GC during action execution.
Date: Fri, 18 Dec 2009 09:39:11 +0100
User-agent: Bazaar (2.0.2)

------------------------------------------------------------
revno: 11712
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Fri 2009-12-18 09:39:11 +0100
message:
  Other places which would need to handle eventual runs of GC during action 
execution.
  Just adds use of ALLOW_GC_RUN_DURING_ACTIONS_EXECUTION macro, also used in VM.
modified:
  libcore/movie_root.cpp
=== modified file 'libcore/movie_root.cpp'
--- a/libcore/movie_root.cpp    2009-12-16 07:11:25 +0000
+++ b/libcore/movie_root.cpp    2009-12-18 08:39:11 +0000
@@ -1693,32 +1693,44 @@
     // Mark DisplayObject being dragged, if any
     m_drag_state.markReachableResources();
 
-    // NOTE: we don't need to mark _liveChars as any elements in that list
-    //       should be NOT unloaded and thus marked as reachable by their
-    //       parent.
-#if GNASH_PARANOIA_LEVEL > 1
+    // NOTE: cleanupDisplayList() should have cleaned up all
+    // unloaded live characters. The remaining ones should be marked
+    // by their parents.
+#if ( GNASH_PARANOIA_LEVEL > 1 ) || 
defined(ALLOW_GC_RUN_DURING_ACTIONS_EXECUTION)
     for (LiveChars::const_iterator i=_liveChars.begin(), e=_liveChars.end();
             i!=e; ++i) {
+#ifdef ALLOW_GC_RUN_DURING_ACTIONS_EXECUTION
+        (*i)->setReachable();
+#else
         assert((*i)->isReachable());
+#endif
     }
 #endif
     
-    // NOTE: cleanupUnloadedListeners should have cleaned up all unloaded
+    // NOTE: cleanupUnloadedListeners() should have cleaned up all unloaded
     // key listeners. The remaining ones should be marked by their parents
-#if GNASH_PARANOIA_LEVEL > 1
+#if ( GNASH_PARANOIA_LEVEL > 1 ) || 
defined(ALLOW_GC_RUN_DURING_ACTIONS_EXECUTION)
     for (LiveChars::const_iterator i=_keyListeners.begin(),
             e=_keyListeners.end(); i!=e; ++i) {
+#ifdef ALLOW_GC_RUN_DURING_ACTIONS_EXECUTION
+        (*i)->setReachable();
+#else
         assert((*i)->isReachable());
+#endif
     }
 #endif
 
-    // NOTE: cleanupUnloadedListeners should have cleaned up all
+    // NOTE: cleanupUnloadedListeners() should have cleaned up all
     // unloaded mouse listeners. The remaining ones should be marked by
     // their parents
-#if GNASH_PARANOIA_LEVEL > 1
+#if ( GNASH_PARANOIA_LEVEL > 1 ) || 
defined(ALLOW_GC_RUN_DURING_ACTIONS_EXECUTION)
     for (LiveChars::const_iterator i = _mouseListeners.begin(),
             e = _mouseListeners.end(); i!=e; ++i) {
+#ifdef ALLOW_GC_RUN_DURING_ACTIONS_EXECUTION
+        (*i)->setReachable();
+#else
         assert((*i)->isReachable());
+#endif
     }
 #endif
 


reply via email to

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