[Swfdec-commits] 4 commits - swfdec-gtk/swfdec_gtk_socket.c swfdec/swfdec_xml_socket.c test/trace
Benjamin Otte
company at kemper.freedesktop.org
Mon Apr 28 10:01:10 PDT 2008
swfdec-gtk/swfdec_gtk_socket.c | 2 +-
swfdec/swfdec_xml_socket.c | 13 ++++++++++---
test/trace/Makefile.am | 9 +++++++++
test/trace/crash-0.6.6-xmlsocket-5.swf |binary
test/trace/crash-0.6.6-xmlsocket-6.swf |binary
test/trace/crash-0.6.6-xmlsocket-7.swf |binary
test/trace/crash-0.6.6-xmlsocket-8.swf |binary
test/trace/crash-0.6.6-xmlsocket.as | 9 +++++++++
8 files changed, 29 insertions(+), 4 deletions(-)
New commits:
commit 685236eb425d9392b8c1d7fb133f8a86c32c8b4d
Merge: b5dd42a... 975d071...
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Apr 28 18:58:30 2008 +0200
Merge branch '0.6'
commit 975d071b38221ea58aa248c60134bfe619cbc459
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Apr 28 18:58:02 2008 +0200
add test for just-fixed crash
diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index c58f524..ca1fcd8 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -736,6 +736,15 @@ EXTRA_DIST = \
crash-0.6.2-try-and-exception-on-dispose-8.swf \
crash-0.6.2-try-and-exception-on-dispose-8.swf.trace \
crash-0.6.2-try-and-exception-on-dispose.as \
+ crash-0.6.6-xmlsocket-5.swf \
+ crash-0.6.6-xmlsocket-5.swf.trace \
+ crash-0.6.6-xmlsocket-6.swf \
+ crash-0.6.6-xmlsocket-6.swf.trace \
+ crash-0.6.6-xmlsocket-7.swf \
+ crash-0.6.6-xmlsocket-7.swf.trace \
+ crash-0.6.6-xmlsocket-8.swf \
+ crash-0.6.6-xmlsocket-8.swf.trace \
+ crash-0.6.6-xmlsocket.as \
currentframe.swf \
currentframe.swf.trace \
dangling-compare.as \
diff --git a/test/trace/crash-0.6.6-xmlsocket-5.swf b/test/trace/crash-0.6.6-xmlsocket-5.swf
new file mode 100644
index 0000000..f2d1d7d
Binary files /dev/null and b/test/trace/crash-0.6.6-xmlsocket-5.swf differ
diff --git a/test/trace/crash-0.6.6-xmlsocket-5.swf.trace b/test/trace/crash-0.6.6-xmlsocket-5.swf.trace
new file mode 100644
index 0000000..e69de29
diff --git a/test/trace/crash-0.6.6-xmlsocket-6.swf b/test/trace/crash-0.6.6-xmlsocket-6.swf
new file mode 100644
index 0000000..a9fdf99
Binary files /dev/null and b/test/trace/crash-0.6.6-xmlsocket-6.swf differ
diff --git a/test/trace/crash-0.6.6-xmlsocket-6.swf.trace b/test/trace/crash-0.6.6-xmlsocket-6.swf.trace
new file mode 100644
index 0000000..e69de29
diff --git a/test/trace/crash-0.6.6-xmlsocket-7.swf b/test/trace/crash-0.6.6-xmlsocket-7.swf
new file mode 100644
index 0000000..dddadb6
Binary files /dev/null and b/test/trace/crash-0.6.6-xmlsocket-7.swf differ
diff --git a/test/trace/crash-0.6.6-xmlsocket-7.swf.trace b/test/trace/crash-0.6.6-xmlsocket-7.swf.trace
new file mode 100644
index 0000000..e69de29
diff --git a/test/trace/crash-0.6.6-xmlsocket-8.swf b/test/trace/crash-0.6.6-xmlsocket-8.swf
new file mode 100644
index 0000000..701296d
Binary files /dev/null and b/test/trace/crash-0.6.6-xmlsocket-8.swf differ
diff --git a/test/trace/crash-0.6.6-xmlsocket-8.swf.trace b/test/trace/crash-0.6.6-xmlsocket-8.swf.trace
new file mode 100644
index 0000000..e69de29
diff --git a/test/trace/crash-0.6.6-xmlsocket.as b/test/trace/crash-0.6.6-xmlsocket.as
new file mode 100644
index 0000000..dd4e6a6
--- /dev/null
+++ b/test/trace/crash-0.6.6-xmlsocket.as
@@ -0,0 +1,9 @@
+// makeswf -v 7 -s 200x150 -r 1 -o crash-0.6.6-xmlsocket.swf crash-0.6.6-xmlsocket.as
+
+x = new XMLSocket ();
+x.connect ("localhost", 80);
+
+y = new XMLSocket ();
+y.send ("hello");
+
+getURL ("fscommand:quit", "");
commit d1be08fc918b3e71038f4fa712267b109f27e57d
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Apr 28 18:53:30 2008 +0200
fix crash when XMLSocket.send() was called before connect()
Also improve the debugging print output for the other error cases
diff --git a/swfdec/swfdec_xml_socket.c b/swfdec/swfdec_xml_socket.c
index f53f168..b207fb6 100644
--- a/swfdec/swfdec_xml_socket.c
+++ b/swfdec/swfdec_xml_socket.c
@@ -252,13 +252,20 @@ swfdec_xml_socket_get (SwfdecAsObject *object)
{
SwfdecXmlSocket *xml;
- if (object == NULL ||
- xml_socket_quark == 0) {
- SWFDEC_WARNING ("no xml socket on object");
+ if (object == NULL) {
+ SWFDEC_WARNING ("no object to get xml socket from");
+ return NULL;
+ }
+ if (xml_socket_quark == 0) {
+ SWFDEC_WARNING ("no sockets have been created yet");
return NULL;
}
xml = g_object_get_qdata (G_OBJECT (object), xml_socket_quark);
+ if (xml == NULL) {
+ SWFDEC_WARNING ("no xml socket on object");
+ return NULL;
+ }
if (xml->socket == NULL) {
SWFDEC_WARNING ("xml socket not open");
return NULL;
commit 7b1a4c21dcdced16535d1ba62b7f31a91c7c03ba
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Apr 28 18:50:02 2008 +0200
fix signal name
Seems we didn't catch this signal name change when updating from 2.2 to 2.4
diff --git a/swfdec-gtk/swfdec_gtk_socket.c b/swfdec-gtk/swfdec_gtk_socket.c
index a4d85e0..71ee191 100644
--- a/swfdec-gtk/swfdec_gtk_socket.c
+++ b/swfdec-gtk/swfdec_gtk_socket.c
@@ -163,7 +163,7 @@ swfdec_gtk_socket_connect (SwfdecSocket *sock_, SwfdecPlayer *player,
sock->sock = soup_socket_new (
SOUP_SOCKET_FLAG_NONBLOCKING, TRUE,
SOUP_SOCKET_REMOTE_ADDRESS, addr, NULL);
- g_signal_connect (sock->sock, "disconnect",
+ g_signal_connect (sock->sock, "disconnected",
G_CALLBACK (swfdec_gtk_socket_do_disconnect), socket);
g_signal_connect (sock->sock, "readable",
G_CALLBACK (swfdec_gtk_socket_do_read), socket);
More information about the Swfdec-commits
mailing list