[Swfdec] 2 commits - player/swfplay.c test/trace

Benjamin Otte company at kemper.freedesktop.org
Fri Oct 12 05:26:51 PDT 2007


 player/swfplay.c                                         |    5 ++++-
 test/trace/Makefile.am                                   |    9 +++++++++
 test/trace/crash-0.5.2-cvs-return-from-block-5.swf       |binary
 test/trace/crash-0.5.2-cvs-return-from-block-5.swf.trace |    1 +
 test/trace/crash-0.5.2-cvs-return-from-block-6.swf       |binary
 test/trace/crash-0.5.2-cvs-return-from-block-6.swf.trace |    1 +
 test/trace/crash-0.5.2-cvs-return-from-block-7.swf       |binary
 test/trace/crash-0.5.2-cvs-return-from-block-7.swf.trace |    1 +
 test/trace/crash-0.5.2-cvs-return-from-block-8.swf       |binary
 test/trace/crash-0.5.2-cvs-return-from-block-8.swf.trace |    1 +
 test/trace/crash-0.5.2-cvs-return-from-block.as          |   12 ++++++++++++
 11 files changed, 29 insertions(+), 1 deletion(-)

New commits:
diff-tree a8bd074e7aa1596bdabff5e033c14f5c284f1e44 (from c44582c11e9667e3a19b0630d1d40b153ca57e1c)
Author: Benjamin Otte <otte at gnome.org>
Date:   Fri Oct 12 14:26:41 2007 +0200

    add a test for a crasher we had in cvs until recently

diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 6995f66..d20beb2 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -346,6 +346,15 @@ EXTRA_DIST = \
 	constructor-prototype.swf.trace \
 	countdown.swf \
 	countdown.swf.trace \
+	crash-0.5.2-cvs-return-from-block.as \
+	crash-0.5.2-cvs-return-from-block-5.swf \
+	crash-0.5.2-cvs-return-from-block-5.swf.trace \
+	crash-0.5.2-cvs-return-from-block-6.swf \
+	crash-0.5.2-cvs-return-from-block-6.swf.trace \
+	crash-0.5.2-cvs-return-from-block-7.swf \
+	crash-0.5.2-cvs-return-from-block-7.swf.trace \
+	crash-0.5.2-cvs-return-from-block-8.swf \
+	crash-0.5.2-cvs-return-from-block-8.swf.trace \
 	crash-0.5.2-cvs-too-many-changes.swf \
 	crash-0.5.2-cvs-too-many-changes.swf.trace \
 	crash-0.5.2-cvs-too-many-changes.xml \
diff --git a/test/trace/crash-0.5.2-cvs-return-from-block-5.swf b/test/trace/crash-0.5.2-cvs-return-from-block-5.swf
new file mode 100644
index 0000000..c2bd9a6
Binary files /dev/null and b/test/trace/crash-0.5.2-cvs-return-from-block-5.swf differ
diff --git a/test/trace/crash-0.5.2-cvs-return-from-block-5.swf.trace b/test/trace/crash-0.5.2-cvs-return-from-block-5.swf.trace
new file mode 100644
index 0000000..41a1e88
--- /dev/null
+++ b/test/trace/crash-0.5.2-cvs-return-from-block-5.swf.trace
@@ -0,0 +1 @@
+CHeck that returning from inside a block works.
diff --git a/test/trace/crash-0.5.2-cvs-return-from-block-6.swf b/test/trace/crash-0.5.2-cvs-return-from-block-6.swf
new file mode 100644
index 0000000..d71e55e
Binary files /dev/null and b/test/trace/crash-0.5.2-cvs-return-from-block-6.swf differ
diff --git a/test/trace/crash-0.5.2-cvs-return-from-block-6.swf.trace b/test/trace/crash-0.5.2-cvs-return-from-block-6.swf.trace
new file mode 100644
index 0000000..41a1e88
--- /dev/null
+++ b/test/trace/crash-0.5.2-cvs-return-from-block-6.swf.trace
@@ -0,0 +1 @@
+CHeck that returning from inside a block works.
diff --git a/test/trace/crash-0.5.2-cvs-return-from-block-7.swf b/test/trace/crash-0.5.2-cvs-return-from-block-7.swf
new file mode 100644
index 0000000..48d3015
Binary files /dev/null and b/test/trace/crash-0.5.2-cvs-return-from-block-7.swf differ
diff --git a/test/trace/crash-0.5.2-cvs-return-from-block-7.swf.trace b/test/trace/crash-0.5.2-cvs-return-from-block-7.swf.trace
new file mode 100644
index 0000000..41a1e88
--- /dev/null
+++ b/test/trace/crash-0.5.2-cvs-return-from-block-7.swf.trace
@@ -0,0 +1 @@
+CHeck that returning from inside a block works.
diff --git a/test/trace/crash-0.5.2-cvs-return-from-block-8.swf b/test/trace/crash-0.5.2-cvs-return-from-block-8.swf
new file mode 100644
index 0000000..b64ecaf
Binary files /dev/null and b/test/trace/crash-0.5.2-cvs-return-from-block-8.swf differ
diff --git a/test/trace/crash-0.5.2-cvs-return-from-block-8.swf.trace b/test/trace/crash-0.5.2-cvs-return-from-block-8.swf.trace
new file mode 100644
index 0000000..41a1e88
--- /dev/null
+++ b/test/trace/crash-0.5.2-cvs-return-from-block-8.swf.trace
@@ -0,0 +1 @@
+CHeck that returning from inside a block works.
diff --git a/test/trace/crash-0.5.2-cvs-return-from-block.as b/test/trace/crash-0.5.2-cvs-return-from-block.as
new file mode 100644
index 0000000..1baa10d
--- /dev/null
+++ b/test/trace/crash-0.5.2-cvs-return-from-block.as
@@ -0,0 +1,12 @@
+// makeswf -v 7 -s 200x150 -r 1 -o crash-0.5.2-cvs-return-from-block.swf crash-0.5.2-cvs-return-from-block.as
+
+foo = function () {
+  trace ("CHeck that returning from inside a block works.");
+  with (this) {
+    return;
+    trace ("hi");
+  };
+};
+foo ();
+
+loadMovie ("FSCommand:quit", "");
diff-tree c44582c11e9667e3a19b0630d1d40b153ca57e1c (from c45d983d1ffc9a1f29ae4050f53e9d33d4565ce3)
Author: Benjamin Otte <otte at gnome.org>
Date:   Fri Oct 12 14:25:11 2007 +0200

    destroy the window when exiting
    
    avoids leaking the whole window hierarchy and with it the player.
    Now the player's dispose is properly run again.

diff --git a/player/swfplay.c b/player/swfplay.c
index 4b9cf03..f9b2fb3 100644
--- a/player/swfplay.c
+++ b/player/swfplay.c
@@ -65,7 +65,10 @@ do_fscommand (SwfdecPlayer *player, cons
 {
   if (g_str_equal (command, "quit")) {
     g_assert (loop);
-    g_main_loop_quit (loop);
+    if (g_main_loop_is_running (loop)) {
+      gtk_widget_destroy (window);
+      g_main_loop_quit (loop);
+    }
   }
   /* FIXME: add more */
 }


More information about the Swfdec mailing list