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: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-103-ge0d851c
Date: Mon, 21 Feb 2011 13:25:06 +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  e0d851c24bfaf6d2209f1e7e75f882ad6b289b3c (commit)
       via  bfd9de7cc6f6657463ea0f5a2ec39ee60f4185a8 (commit)
       via  a522008eb8daf6add1a76288ebd9ca9961559dff (commit)
       via  081c8e26191f4db4c82ee15da0f3cc44503f87a2 (commit)
       via  48d819b62f0208f5d3d290c2675eb58a70780e0f (commit)
      from  dd8c8828b74062646954606167e81402209e709a (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=e0d851c24bfaf6d2209f1e7e75f882ad6b289b3c


commit e0d851c24bfaf6d2209f1e7e75f882ad6b289b3c
Author: Benjamin Wolsey <address@hidden>
Date:   Mon Feb 21 13:51:51 2011 +0100

    Do not execute tags on destroyed MovieClips: fixes
    bug #32510 and the new action_order tests.
    
    Drop unused function to avoid confusion.

diff --git a/libcore/MovieClip.cpp b/libcore/MovieClip.cpp
index 20ce020..eec8b4c 100644
--- a/libcore/MovieClip.cpp
+++ b/libcore/MovieClip.cpp
@@ -505,26 +505,6 @@ MovieClip::getDefinitionVersion() const
     return _swf->version();
 }
 
-// Execute the actions in the action list, in the given
-// environment. The list of action will be consumed
-// starting from the first element. When the function returns
-// the list should be empty.
-void
-MovieClip::execute_actions(MovieClip::ActionList& action_list)
-{
-    // action_list may be changed due to actions (appended-to)
-    // This loop is probably quicker than using an iterator
-    // and a final call to .clear(), as repeated calls to
-    // .size() or .end() are no quicker (and probably slower)
-    // than pop_front(), which is constant time.
-    while (!action_list.empty()) {
-        const action_buffer* ab = action_list.front();
-        action_list.pop_front(); 
-
-        execute_action(*ab);
-    }
-}
-
 DisplayObject*
 MovieClip::getDisplayObjectAtDepth(int depth)
 {
@@ -596,6 +576,9 @@ MovieClip::call_frame_actions(const as_value& frame_spec)
     // and has no frames.
     if (!_def) return;
 
+    // TODO: check to see how this can be prevented.
+    if (isDestroyed()) return;
+
     size_t frame_number;
     if (!get_frame_number(frame_spec, frame_number)) {
         // No dice.
@@ -980,6 +963,7 @@ MovieClip::executeFrameTags(size_t frame, DisplayList& 
dlist, int typeflags)
     // If there is no definition, this is a dynamically-created MovieClip
     // and has no frames.
     if (!_def) return;
+    if (isDestroyed()) return;
 
     assert(typeflags);
 
@@ -1184,6 +1168,9 @@ MovieClip::add_display_object(const SWF::PlaceObject2Tag* 
tag,
     assert(_def);
     assert(tag);
 
+    // No tags should ever be executed on destroyed MovieClips.
+    assert(!isDestroyed());
+
     SWF::DefinitionTag* cdef = _def->getDefinitionTag(tag->getID());
     if (!cdef) {
         IF_VERBOSE_MALFORMED_SWF(
diff --git a/libcore/MovieClip.h b/libcore/MovieClip.h
index 9bb0357..b2beb34 100644
--- a/libcore/MovieClip.h
+++ b/libcore/MovieClip.h
@@ -706,13 +706,6 @@ private:
     ///
     void restoreDisplayList(size_t targetFrame);
 
-    /// Execute the actions in the action list
-    //
-    /// The list of action will be consumed starting from the first
-    /// element. When the function returns the list should be empty.
-    ///
-    void execute_actions(ActionList& action_list);
-
     /// Increment _currentFrame, and take care of looping.
     void increment_frame_and_check_for_loop();
 

http://git.savannah.gnu.org/cgit//commit/?id=bfd9de7cc6f6657463ea0f5a2ec39ee60f4185a8


commit bfd9de7cc6f6657463ea0f5a2ec39ee60f4185a8
Author: Benjamin Wolsey <address@hidden>
Date:   Mon Feb 21 13:41:07 2011 +0100

    Add simpler test for failing case.

diff --git a/testsuite/misc-ming.all/action_order/PlaceAndRemove.c 
b/testsuite/misc-ming.all/action_order/PlaceAndRemove.c
index 999d075..1b88bc1 100644
--- a/testsuite/misc-ming.all/action_order/PlaceAndRemove.c
+++ b/testsuite/misc-ming.all/action_order/PlaceAndRemove.c
@@ -14,7 +14,7 @@ int main(int argc, char* argv[])
 {
 
     SWFMovie mo;
-    SWFMovieClip mc50, mc51, mc74;
+    SWFMovieClip mc50, mc51, mc74, dejagnuclip;
     SWFDisplayItem it3, it52;
 
     const char *srcdir=".";
@@ -29,9 +29,15 @@ int main(int argc, char* argv[])
     SWFMovie_setDimension(mo, 800, 600);
     SWFMovie_setRate (mo, 12.0);
 
+    dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10,
+                0, 0, 800, 600);
+    SWFMovie_add(mo, (SWFBlock)dejagnuclip);
+
     // Empty character 50.
     mc50 = newSWFMovieClip();
-    SWFMovieClip_add(mc50, (SWFBlock)newSWFAction("trace('moo ' + 
++_global.counter);"));
+    SWFMovieClip_add(mc50, (SWFBlock)newSWFAction(
+                "trace('moo ' + ++_global.counter);"
+                "_root.fail('This MovieClip should never be constructed');"));
     SWFMovieClip_nextFrame(mc50);
 
     mc51 = newSWFMovieClip();
@@ -50,7 +56,6 @@ int main(int argc, char* argv[])
 
     SWFMovieClip_nextFrame(mc51);
 
-
     mc74 = newSWFMovieClip();
 
     SWFMovieClip_addInitAction(mc74, newSWFAction("_global.counter = 0;"));

http://git.savannah.gnu.org/cgit//commit/?id=a522008eb8daf6add1a76288ebd9ca9961559dff


commit a522008eb8daf6add1a76288ebd9ca9961559dff
Author: Benjamin Wolsey <address@hidden>
Date:   Mon Feb 21 13:32:17 2011 +0100

    Play for long enough to get a failure.

diff --git a/testsuite/misc-ming.all/action_order/Makefile.am 
b/testsuite/misc-ming.all/action_order/Makefile.am
index 297bd60..f4d9f75 100644
--- a/testsuite/misc-ming.all/action_order/Makefile.am
+++ b/testsuite/misc-ming.all/action_order/Makefile.am
@@ -256,7 +256,7 @@ PlaceAndRemove.swf: PlaceAndRemove
        ./PlaceAndRemove $(abs_mediadir)
 
 PlaceAndRemoveRunner: $(srcdir)/../../generic-testrunner.sh PlaceAndRemove.swf
-       sh $(srcdir)/../../generic-testrunner.sh $(top_builddir) 
PlaceAndRemove.swf > $@
+       sh $(srcdir)/../../generic-testrunner.sh -r40 $(top_builddir) 
PlaceAndRemove.swf > $@
        chmod 755 $@
 
 ActionOrderTest3_SOURCES =     \
diff --git a/testsuite/misc-ming.all/action_order/PlaceAndRemove.c 
b/testsuite/misc-ming.all/action_order/PlaceAndRemove.c
index 95d3c2a..999d075 100644
--- a/testsuite/misc-ming.all/action_order/PlaceAndRemove.c
+++ b/testsuite/misc-ming.all/action_order/PlaceAndRemove.c
@@ -31,7 +31,7 @@ int main(int argc, char* argv[])
 
     // Empty character 50.
     mc50 = newSWFMovieClip();
-    SWFMovieClip_add(mc50, (SWFBlock)newSWFAction("trace('moo');"));
+    SWFMovieClip_add(mc50, (SWFBlock)newSWFAction("trace('moo ' + 
++_global.counter);"));
     SWFMovieClip_nextFrame(mc50);
 
     mc51 = newSWFMovieClip();
@@ -52,6 +52,9 @@ int main(int argc, char* argv[])
 
 
     mc74 = newSWFMovieClip();
+
+    SWFMovieClip_addInitAction(mc74, newSWFAction("_global.counter = 0;"));
+
     it52 = SWFMovieClip_add(mc74, (SWFBlock)mc51);
     SWFDisplayItem_setDepth(it52, 52);
     SWFDisplayItem_remove(it52);

http://git.savannah.gnu.org/cgit//commit/?id=081c8e26191f4db4c82ee15da0f3cc44503f87a2


commit 081c8e26191f4db4c82ee15da0f3cc44503f87a2
Author: Benjamin Wolsey <address@hidden>
Date:   Mon Feb 21 13:13:55 2011 +0100

    Add test for segfault in advance chars.

diff --git a/testsuite/misc-ming.all/action_order/Makefile.am 
b/testsuite/misc-ming.all/action_order/Makefile.am
index 8478306..297bd60 100644
--- a/testsuite/misc-ming.all/action_order/Makefile.am
+++ b/testsuite/misc-ming.all/action_order/Makefile.am
@@ -76,6 +76,7 @@ check_PROGRAMS = \
        action_execution_order_test8 \
        action_execution_order_test9 \
        action_execution_order_test11 \
+       PlaceAndRemove \
        $(NULL)
 
 if MING_SUPPORTS_INIT_ACTIONS
@@ -99,6 +100,7 @@ check_SCRIPTS = \
        action_execution_order_test8runner \
        action_execution_order_test9runner \
        action_execution_order_test11runner \
+       PlaceAndRemoveRunner \
        $(NULL)
 
 if MING_SUPPORTS_INIT_ACTIONS
@@ -244,6 +246,19 @@ action_execution_order_test11runner: 
$(srcdir)/../../generic-testrunner.sh actio
        sh $(srcdir)/../../generic-testrunner.sh -f10 $(top_builddir) 
action_execution_order_test11.swf > $@
        chmod 755 $@
 
+
+PlaceAndRemove_SOURCES =       \
+       PlaceAndRemove.c        \
+       $(NULL)
+PlaceAndRemove_LDADD = ../libgnashmingutils.la
+
+PlaceAndRemove.swf: PlaceAndRemove
+       ./PlaceAndRemove $(abs_mediadir)
+
+PlaceAndRemoveRunner: $(srcdir)/../../generic-testrunner.sh PlaceAndRemove.swf
+       sh $(srcdir)/../../generic-testrunner.sh $(top_builddir) 
PlaceAndRemove.swf > $@
+       chmod 755 $@
+
 ActionOrderTest3_SOURCES =     \
        ActionOrderTest3.c      \
        $(NULL)
diff --git a/testsuite/misc-ming.all/action_order/PlaceAndRemove.c 
b/testsuite/misc-ming.all/action_order/PlaceAndRemove.c
new file mode 100644
index 0000000..95d3c2a
--- /dev/null
+++ b/testsuite/misc-ming.all/action_order/PlaceAndRemove.c
@@ -0,0 +1,70 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 8
+#define OUTPUT_FILENAME "PlaceAndRemove.swf"
+
+/* Tests placing and removal; not really action order, but
+ * rather what happens when placing happens after removal */
+
+int main(int argc, char* argv[])
+{
+
+    SWFMovie mo;
+    SWFMovieClip mc50, mc51, mc74;
+    SWFDisplayItem it3, it52;
+
+    const char *srcdir=".";
+    if (argc > 1) srcdir = argv[1];
+    else {
+        fprintf(stderr, "Usage: %s <mediadir>\n", argv[0]);
+        return 1;
+    }
+
+    Ming_init();
+    mo = newSWFMovieWithVersion(OUTPUT_VERSION);
+    SWFMovie_setDimension(mo, 800, 600);
+    SWFMovie_setRate (mo, 12.0);
+
+    // Empty character 50.
+    mc50 = newSWFMovieClip();
+    SWFMovieClip_add(mc50, (SWFBlock)newSWFAction("trace('moo');"));
+    SWFMovieClip_nextFrame(mc50);
+
+    mc51 = newSWFMovieClip();
+    SWFMovieClip_add(mc51, (SWFBlock)newSWFAction(
+                "function doStuff() {"
+                "    gotoAndPlay(2);"
+                "};"
+                "_global.setTimeout(doStuff, 524);"
+                "trace('Done');"
+                "stop();"
+                ));
+    SWFMovieClip_nextFrame(mc51);
+
+    it3 = SWFMovieClip_add(mc51, (SWFBlock)mc50);
+    SWFDisplayItem_setDepth(it3, 3);
+
+    SWFMovieClip_nextFrame(mc51);
+
+
+    mc74 = newSWFMovieClip();
+    it52 = SWFMovieClip_add(mc74, (SWFBlock)mc51);
+    SWFDisplayItem_setDepth(it52, 52);
+    SWFDisplayItem_remove(it52);
+    SWFMovieClip_nextFrame(mc74);
+    it52 = SWFMovieClip_add(mc74, (SWFBlock)mc51);
+    SWFMovieClip_nextFrame(mc74);
+
+    SWFMovie_add(mo, (SWFBlock)mc74);
+    SWFMovie_nextFrame(mo);
+
+    SWFMovie_save(mo, OUTPUT_FILENAME);
+
+    return EXIT_SUCCESS;
+
+}
+

http://git.savannah.gnu.org/cgit//commit/?id=48d819b62f0208f5d3d290c2675eb58a70780e0f


commit 48d819b62f0208f5d3d290c2675eb58a70780e0f
Author: Benjamin Wolsey <address@hidden>
Date:   Sat Feb 19 13:22:47 2011 +0100

    Do zero-initialize buffer because the code is evidently
    not robust enough to avoid reading uninitialized parts.

diff --git a/librender/agg/Renderer_agg.cpp b/librender/agg/Renderer_agg.cpp
index 6026ede..43e5b04 100644
--- a/librender/agg/Renderer_agg.cpp
+++ b/librender/agg/Renderer_agg.cpp
@@ -329,13 +329,9 @@ public:
         _pixf(_rbuf),
         _rbase(_pixf),
         _amask(_rbuf),
-        _buffer(new boost::uint8_t[width * height])
+        _buffer(new boost::uint8_t[width * height]())
     {
         _rbuf.attach(_buffer.get(), width, height, width);
-        
-        // NOTE: The buffer is *not* cleared. The clear() function must
-        // be called to clear the buffer (alpha=0). The reason is to avoid
-        // clearing the whole mask when only a small portion is really used.
     }
     
     void clear(const geometry::Range2d<int>& region)

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

Summary of changes:
 libcore/MovieClip.cpp                              |   27 ++-----
 libcore/MovieClip.h                                |    7 --
 librender/agg/Renderer_agg.cpp                     |    6 +-
 testsuite/misc-ming.all/action_order/Makefile.am   |   15 ++++
 .../misc-ming.all/action_order/PlaceAndRemove.c    |   78 ++++++++++++++++++++
 5 files changed, 101 insertions(+), 32 deletions(-)
 create mode 100644 testsuite/misc-ming.all/action_order/PlaceAndRemove.c


hooks/post-receive
-- 
Gnash



reply via email to

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