gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r11411: Minor fix to AsBroadcaster.


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11411: Minor fix to AsBroadcaster.
Date: Wed, 12 Aug 2009 17:40:36 +0200
User-agent: Bazaar (1.16.1)

------------------------------------------------------------
revno: 11411 [merge]
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Wed 2009-08-12 17:40:36 +0200
message:
  Minor fix to AsBroadcaster.
modified:
  libcore/asobj/AsBroadcaster.cpp
  libcore/namedStrings.cpp
  libcore/namedStrings.h
  testsuite/swfdec/PASSING
=== modified file 'libcore/asobj/AsBroadcaster.cpp'
--- a/libcore/asobj/AsBroadcaster.cpp   2009-07-29 05:59:24 +0000
+++ b/libcore/asobj/AsBroadcaster.cpp   2009-08-12 14:27:26 +0000
@@ -130,20 +130,14 @@
     }
     
     Global_as* gl = getGlobal(o);
-    o.set_member(NSV::PROP_BROADCAST_MESSAGE,
-            gl->createFunction(asbroadcaster_broadcastMessage));
+    
+    // The function returned by ASnative(101, 12) is attached, even though
+    // this may not exist (e.g. if _global.ASnative is altered)
+    const as_value& asn = gl->callMethod(NSV::PROP_AS_NATIVE, 101, 12);
+    o.set_member(NSV::PROP_BROADCAST_MESSAGE, asn);
 
     o.set_member(NSV::PROP_uLISTENERS, new Array_as());
 
-#ifndef NDEBUG
-    assert(o.get_member(NSV::PROP_uLISTENERS, &tmp));
-    assert(tmp.is_object());
-    assert(o.get_member(NSV::PROP_BROADCAST_MESSAGE, &tmp));
-    assert(tmp.is_function());
-
-    // The following properties may be overridden in the AsBroadcaster object
-    // and thus unavailable: addListener, removeListener
-#endif
 }
 
 as_object*

=== modified file 'libcore/namedStrings.cpp'
--- a/libcore/namedStrings.cpp  2009-07-26 22:56:39 +0000
+++ b/libcore/namedStrings.cpp  2009-08-12 14:05:36 +0000
@@ -34,6 +34,7 @@
        string_table::svt( "a", NSV::PROP_A ),
        string_table::svt( "addListener", NSV::PROP_ADD_LISTENER ),
        string_table::svt( "align", NSV::PROP_ALIGN ),
+       string_table::svt( "ASnative", NSV::PROP_AS_NATIVE ),
        string_table::svt( "_alpha", NSV::PROP_uALPHA ),
        string_table::svt( "b", NSV::PROP_B ),
        string_table::svt( "blockIndent", NSV::PROP_BLOCK_INDENT ),

=== modified file 'libcore/namedStrings.h'
--- a/libcore/namedStrings.h    2009-08-04 17:39:22 +0000
+++ b/libcore/namedStrings.h    2009-08-12 14:05:36 +0000
@@ -128,6 +128,7 @@
         PROP_A,
         PROP_ADD_LISTENER,
         PROP_ALIGN,
+        PROP_AS_NATIVE,
         PROP_B,
         PROP_BLOCK_INDENT,
         PROP_BOLD,

=== modified file 'testsuite/swfdec/PASSING'
--- a/testsuite/swfdec/PASSING  2009-08-11 11:45:26 +0000
+++ b/testsuite/swfdec/PASSING  2009-08-12 15:02:36 +0000
@@ -65,6 +65,9 @@
 asbroadcaster-listeners-7.swf:38726a7a2f22b604c02c6c4bee4c0bd7
 asbroadcaster-listeners-8.swf:7daa180ce19d8c4e4dcb17051908e12b
 asbroadcaster-override-5.swf:1a3dacf6579b150773097362b546ee7e
+asbroadcaster-override-6.swf:cc28cc39d8a841d68d42ad6328c3ac6e
+asbroadcaster-override-7.swf:5834d9f0de106265f5ff479d789d2f35
+asbroadcaster-override-8.swf:017c5505a342570726c90b81297626dc
 asnative-create-5.swf:d10ce975ae57f9a6e29c8fc97eb01489
 asnative-create-6.swf:79aa26f566218edbdecdb46e88be7a1a
 asnative-create-7.swf:b3f18c999ed081ac39132ec6a9df2cb0


reply via email to

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