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. 2420a73e8d46306cc6a1


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. 2420a73e8d46306cc6a1474c5367ae100bde958f
Date: Fri, 10 Dec 2010 11:46:21 +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  2420a73e8d46306cc6a1474c5367ae100bde958f (commit)
       via  218c0034ccad2028698dbb750e7d984b6f92dc12 (commit)
       via  de38f9eec164f6d6d6e972c7f89f41745db5f5ce (commit)
       via  2cbad2f7629850e7dc7d8a3bcaad8b77b8e1916b (commit)
       via  3be23956d494dec17f322e2bae9e25060f8da9e4 (commit)
       via  79a17611be17fa62a3478f1cece91ac983f410d0 (commit)
       via  215e7a1b20048cd2f338380f3703819ff624fa39 (commit)
       via  46b5251707fd788fce2ed36ca1bc9606ee2550b0 (commit)
       via  c432cd80fe57ad9c20ade0ca0b07fcc2a5279481 (commit)
      from  17b5ba85b04310e6cf5b80ad567457b81255823d (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=2420a73e8d46306cc6a1474c5367ae100bde958f


commit 2420a73e8d46306cc6a1474c5367ae100bde958f
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Dec 10 12:07:54 2010 +0100

    Cleanup of includes.

diff --git a/libcore/asobj/XMLNode_as.cpp b/libcore/asobj/XMLNode_as.cpp
index 233e2ab..0129a2d 100644
--- a/libcore/asobj/XMLNode_as.cpp
+++ b/libcore/asobj/XMLNode_as.cpp
@@ -17,8 +17,14 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-
 #include "XMLNode_as.h"
+
+#include <boost/bind.hpp>
+#include <string>
+#include <sstream>
+#include <vector>
+#include <algorithm>
+
 #include "XML_as.h"
 #include "VM.h"
 #include "log.h"
@@ -27,18 +33,11 @@
 #include "smart_ptr.h" // for boost intrusive_ptr
 #include "builtin_function.h" // need builtin_function
 #include "NativeFunction.h"
-#include "VM.h"
 #include "PropertyList.h"
 #include "Global_as.h"
 #include "Object.h"
 #include "Array_as.h"
-
 #include "namedStrings.h"
-#include <boost/bind.hpp>
-#include <string>
-#include <sstream>
-#include <vector>
-#include <algorithm>
 
 namespace gnash {
 

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


commit 218c0034ccad2028698dbb750e7d984b6f92dc12
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Dec 10 12:07:24 2010 +0100

    Drop more debugging.

diff --git a/libcore/asobj/XMLNode_as.cpp b/libcore/asobj/XMLNode_as.cpp
index ed29975..233e2ab 100644
--- a/libcore/asobj/XMLNode_as.cpp
+++ b/libcore/asobj/XMLNode_as.cpp
@@ -196,8 +196,7 @@ XMLNode_as*
 XMLNode_as::lastChild()
 {
        if (_children.empty()) {
-                       log_debug(_("XMLNode_as %p has no children"), 
(void*)this);
-                       return 0;
+        return 0;
        }
        return _children.back();
 }

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


commit de38f9eec164f6d6d6e972c7f89f41745db5f5ce
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Dec 10 12:06:48 2010 +0100

    Drop debugging message.

diff --git a/libcore/asobj/LoadableObject.cpp b/libcore/asobj/LoadableObject.cpp
index 2364220..79e468e 100644
--- a/libcore/asobj/LoadableObject.cpp
+++ b/libcore/asobj/LoadableObject.cpp
@@ -456,16 +456,11 @@ loadableobject_send(const fn_call& fn)
 {
     as_object* obj = ensure<ValidThis>(fn);
  
-    std::ostringstream os;
-    fn.dump_args(os);
-    log_debug("XML.send(%s) / LoadVars.send() TESTING", os.str());
-
     std::string target;
     std::string url;
     std::string method;
 
-    switch (fn.nargs)
-    {
+    switch (fn.nargs) {
         case 0:
             return as_value(false);
         case 3:

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


commit 2cbad2f7629850e7dc7d8a3bcaad8b77b8e1916b
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Dec 10 11:57:57 2010 +0100

    Fix another crash.

diff --git a/libcore/asobj/XMLSocket_as.cpp b/libcore/asobj/XMLSocket_as.cpp
index 806c4e0..c8415ee 100644
--- a/libcore/asobj/XMLSocket_as.cpp
+++ b/libcore/asobj/XMLSocket_as.cpp
@@ -315,10 +315,11 @@ xmlsocket_connect(const fn_call& fn)
         return as_value(false);
     }
  
-    if (!fn.nargs) {
+    if (fn.nargs < 2) {
         IF_VERBOSE_ASCODING_ERRORS(
-            log_aserror(_("XMLSocket.connect() needs at least one argument"));
+            log_aserror(_("XMLSocket.connect() needs two arguments"));
         );
+        // TODO: check expected return values!
         return as_value();
     }
 

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


commit 3be23956d494dec17f322e2bae9e25060f8da9e4
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Dec 10 11:55:44 2010 +0100

    Fix a number of potential crashes in XMLSocket.

diff --git a/libcore/asobj/XMLSocket_as.cpp b/libcore/asobj/XMLSocket_as.cpp
index 3951ce3..806c4e0 100644
--- a/libcore/asobj/XMLSocket_as.cpp
+++ b/libcore/asobj/XMLSocket_as.cpp
@@ -18,11 +18,17 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
+#include "XMLSocket_as.h"
+
+#include <boost/thread.hpp>
+#include <boost/scoped_array.hpp>
+#include <boost/scoped_ptr.hpp>
+#include <string>
 
+#include "namedStrings.h"
 #include "GnashSystemFDHeaders.h"
 #include "utility.h"
 #include "Socket.h"
-#include "XMLSocket_as.h"
 #include "as_function.h"
 #include "movie_root.h"
 #include "fn_call.h"
@@ -34,12 +40,6 @@
 #include "Global_as.h" 
 #include "log.h"
 
-#include "namedStrings.h"
-#include <boost/thread.hpp>
-#include <boost/scoped_array.hpp>
-#include <boost/scoped_ptr.hpp>
-#include <string>
-
 #undef GNASH_XMLSOCKET_DEBUG
 
 namespace gnash {
@@ -132,7 +132,6 @@ XMLSocket_as::~XMLSocket_as()
 void
 XMLSocket_as::update()
 {
-
     // This function should never be called unless a connection is active 
     // or a connection attempt is being made.
 
@@ -261,7 +260,6 @@ XMLSocket_as::checkForIncomingData()
 
 }
 
-
 // XMLSocket.send doesn't return anything, so we don't need
 // to here either.
 void
@@ -316,7 +314,14 @@ xmlsocket_connect(const fn_call& fn)
                     "connected, ignored"));
         return as_value(false);
     }
-    
+ 
+    if (!fn.nargs) {
+        IF_VERBOSE_ASCODING_ERRORS(
+            log_aserror(_("XMLSocket.connect() needs at least one argument"));
+        );
+        return as_value();
+    }
+
     as_value hostval = fn.arg(0);
     const std::string& host = hostval.to_string();
     const double port = toNumber(fn.arg(1), getVM(fn));
@@ -350,6 +355,12 @@ as_value
 xmlsocket_send(const fn_call& fn)
 {
     XMLSocket_as* ptr = ensure<ThisIsNative<XMLSocket_as> >(fn);
+    if (!fn.nargs) {
+        IF_VERBOSE_ASCODING_ERRORS(
+            log_aserror(_("XMLSocket.send() needs at least one argument"));
+        );
+        return as_value();
+    }
     const std::string& str = fn.arg(0).to_string();
     ptr->send(str);
     return as_value();
@@ -363,7 +374,6 @@ as_value
 xmlsocket_close(const fn_call& fn)
 {
     XMLSocket_as* ptr = ensure<ThisIsNative<XMLSocket_as> >(fn);
-
     ptr->close();
     return as_value();
 }
@@ -371,7 +381,7 @@ xmlsocket_close(const fn_call& fn)
 as_value
 xmlsocket_new(const fn_call& fn)
 {
-    as_object* obj = fn.this_ptr;
+    as_object* obj = ensure<ValidThis>(fn);
     obj->setRelay(new XMLSocket_as(obj));
     return as_value();
 }
@@ -379,26 +389,7 @@ xmlsocket_new(const fn_call& fn)
 as_value
 xmlsocket_onData(const fn_call& fn)
 {
-   
-    if (!fn.nargs) {
-        IF_VERBOSE_ASCODING_ERRORS(
-            log_aserror(_("Builtin XMLSocket.onData() needs an argument"));
-        );
-        return as_value();
-    }
-
-    const std::string& xmlin = fn.arg(0).to_string();
-
-#ifdef GNASH_XMLSOCKET_DEBUG
-    log_debug("Arg: %s, val: %s", xmlin, fn.arg(0));
-#endif
-
-    if (xmlin.empty()) {
-        log_error(_("Builtin XMLSocket.onData() called with an argument "
-                        "that resolves to an empty string: %s"), fn.arg(0));
-        return as_value();
-    }
-
+    const as_value& xmlin = fn.nargs ? fn.arg(0).to_string() : as_value();
 
     Global_as& gl = getGlobal(fn);
     as_function* ctor = getMember(gl, NSV::CLASS_XML).to_function();

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


commit 79a17611be17fa62a3478f1cece91ac983f410d0
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Dec 10 10:13:47 2010 +0100

    Don't use init_member because this will cause a crash
    if the member is read-only.

diff --git a/libcore/asobj/Color_as.cpp b/libcore/asobj/Color_as.cpp
index d1134c5..46456ae 100644
--- a/libcore/asobj/Color_as.cpp
+++ b/libcore/asobj/Color_as.cpp
@@ -19,6 +19,9 @@
 //
 
 #include "Color_as.h"
+
+#include <sstream>
+
 #include "as_object.h" // for inheritance
 #include "log.h"
 #include "fn_call.h"
@@ -29,10 +32,7 @@
 #include "SWFCxForm.h" // for composition
 #include "VM.h"
 #include "MovieClip.h"
-
 #include "namedStrings.h"
-#include <sstream>
-
 
 namespace gnash {
 
@@ -242,9 +242,7 @@ color_ctor(const fn_call& fn)
     as_value target;
     if (fn.nargs) target = fn.arg(0);
 
-    const int flags = as_object::DefaultFlags | PropFlags::readOnly;
-
-    obj->init_member(NSV::PROP_TARGET, target, flags); 
+    obj->set_member(NSV::PROP_TARGET, target);
 
     Global_as& gl = getGlobal(fn);
     as_object* null = 0;

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


commit 215e7a1b20048cd2f338380f3703819ff624fa39
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Dec 10 10:10:02 2010 +0100

    Include header and make it independent.

diff --git a/libcore/asobj/MovieClipLoader.cpp 
b/libcore/asobj/MovieClipLoader.cpp
index fa6f33a..aa940d1 100644
--- a/libcore/asobj/MovieClipLoader.cpp
+++ b/libcore/asobj/MovieClipLoader.cpp
@@ -18,6 +18,10 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
+#include "MovieClipLoader.h"
+
+#include <string>
+
 #include "smart_ptr.h" // GNASH_USE_GC
 #include "as_value.h"
 #include "as_object.h" // for inheritance
@@ -28,8 +32,6 @@
 #include "MovieClip.h"
 #include "DisplayObject.h" // for loadClip (get_parent)
 #include "log.h"
-#include "URL.h" // for url parsing
-#include "VM.h" // for the string table.
 #include "VM.h" // for the string table.
 #include "builtin_function.h"
 #include "AsBroadcaster.h" // for initializing self as a broadcaster
@@ -37,13 +39,10 @@
 #include "ExecutableCode.h"
 #include "NativeFunction.h"
 
-#include <string>
-
 //#define GNASH_DEBUG 1
 
 namespace gnash {
 
-
 // Forward declarations
 namespace {
     as_value moviecliploader_loadClip(const fn_call& fn);
@@ -88,7 +87,6 @@ namespace {
 void
 attachMovieClipLoaderInterface(as_object& o)
 {
-
     const int flags = PropFlags::onlySWF7Up;
 
     VM& vm = getVM(o);
@@ -96,13 +94,11 @@ attachMovieClipLoaderInterface(as_object& o)
        o.init_member("loadClip", vm.getNative(112, 100), flags);
        o.init_member("getProgress", vm.getNative(112, 101), flags);
        o.init_member("unloadClip", vm.getNative(112, 102), flags);
-
 }
 
 as_value
 moviecliploader_loadClip(const fn_call& fn)
 {
-
     as_object* ptr = ensure<ValidThis>(fn);
   
        if (fn.nargs < 2) {
@@ -181,9 +177,7 @@ moviecliploader_new(const fn_call& fn)
 as_value
 moviecliploader_getProgress(const fn_call& fn)
 {
-
-       if ( ! fn.nargs )
-       {
+       if (!fn.nargs) {
                IF_VERBOSE_ASCODING_ERRORS(
                log_aserror(_("MovieClipLoader.getProgress(): missing 
argument"));
                );
@@ -209,7 +203,6 @@ moviecliploader_getProgress(const fn_call& fn)
                return as_value();
        }
 
-
        as_object* mcl_obj = new as_object(getGlobal(fn));
 
        size_t bytesLoaded = sp->get_bytes_loaded();
diff --git a/libcore/asobj/MovieClipLoader.h b/libcore/asobj/MovieClipLoader.h
index b9aab52..5479acf 100644
--- a/libcore/asobj/MovieClipLoader.h
+++ b/libcore/asobj/MovieClipLoader.h
@@ -24,6 +24,7 @@
 namespace gnash {
 
 class as_object;
+class ObjectURI;
 
 /// Initialize the global MovieClipLoader class
 void moviecliploader_class_init(as_object& global, const ObjectURI& uri);

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


commit 46b5251707fd788fce2ed36ca1bc9606ee2550b0
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Dec 10 09:51:13 2010 +0100

    Fix crash.

diff --git a/libcore/asobj/MovieClipLoader.cpp 
b/libcore/asobj/MovieClipLoader.cpp
index 5bb5c5d..fa6f33a 100644
--- a/libcore/asobj/MovieClipLoader.cpp
+++ b/libcore/asobj/MovieClipLoader.cpp
@@ -149,9 +149,18 @@ moviecliploader_loadClip(const fn_call& fn)
 as_value
 moviecliploader_unloadClip(const fn_call& fn)
 {
-  const std::string filespec = fn.arg(0).to_string();
-  log_unimpl (_("%s: %s"), __PRETTY_FUNCTION__, filespec);
-  return as_value();
+    if (!fn.nargs) {
+               IF_VERBOSE_ASCODING_ERRORS(
+            std::stringstream ss; fn.dump_args(ss);
+            log_aserror(_("MovieClipLoader.unloadClip(%s): expected at least"
+                    "one argument"), ss.str());
+        );
+        return as_value();
+    }
+
+    const std::string filespec = fn.arg(0).to_string();
+    log_unimpl(_("MovieClipLoader.unloadClip: %s"), __PRETTY_FUNCTION__, 
filespec);
+    return as_value();
 }
 
 as_value

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


commit c432cd80fe57ad9c20ade0ca0b07fcc2a5279481
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Dec 10 09:51:06 2010 +0100

    Cause crash.

diff --git a/testsuite/actionscript.all/MovieClipLoader.as 
b/testsuite/actionscript.all/MovieClipLoader.as
index c5ad9d2..a02c6ad 100644
--- a/testsuite/actionscript.all/MovieClipLoader.as
+++ b/testsuite/actionscript.all/MovieClipLoader.as
@@ -51,6 +51,9 @@ check(!mcl.hasOwnProperty('loadClip'));
 check_equals(typeOf(mcl.unloadClip), 'function');
 check(!mcl.hasOwnProperty('unloadClip'));
 
+ret = mcl.unloadClip();
+check_equals(ret, undefined);
+
 check_equals(typeOf(mcl.getProgress), 'function');
 check(!mcl.hasOwnProperty('getProgress'));
 
@@ -373,7 +376,7 @@ function test3()
        // subtract the number of progress callback runs reported when playing 
from the totals to get the correct number
        // BUT MAKE SURE nextTestOrEnd CONTAINS THE CORRECT 
testsPerProgressCallback INFO !!
        //
-       expected.totals = 84;
+       expected.totals = 85;
        // gnash doesn't call onLoadInit if the data at the url is not an SWF 
or JPG
        // (or whatever else can become a movie_instance), while the PP does.
        // So in this testcase, the attempt to load vars.txt is invalid for 
Gnash

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

Summary of changes:
 libcore/asobj/Color_as.cpp                    |   10 ++---
 libcore/asobj/LoadableObject.cpp              |    7 +---
 libcore/asobj/MovieClipLoader.cpp             |   32 +++++++-------
 libcore/asobj/MovieClipLoader.h               |    1 +
 libcore/asobj/XMLNode_as.cpp                  |   18 ++++----
 libcore/asobj/XMLSocket_as.cpp                |   56 +++++++++++--------------
 testsuite/actionscript.all/MovieClipLoader.as |    5 ++-
 7 files changed, 59 insertions(+), 70 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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