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_final-


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-320-g03fce3a
Date: Thu, 28 Apr 2011 08:43:32 +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  03fce3a4bd9a69dd915245975b3f5a1f7651f1da (commit)
       via  2f6d0782b80160c3634ecca50e9bbd98e6296f6d (commit)
      from  80af832443dc809c1a41a7ddb267f4e3831684aa (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=03fce3a4bd9a69dd915245975b3f5a1f7651f1da


commit 03fce3a4bd9a69dd915245975b3f5a1f7651f1da
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Apr 28 09:44:27 2011 +0200

    Show some delete problems.

diff --git a/testsuite/actionscript.all/delete.as 
b/testsuite/actionscript.all/delete.as
index e92611d..30c9c7b 100644
--- a/testsuite/actionscript.all/delete.as
+++ b/testsuite/actionscript.all/delete.as
@@ -259,10 +259,35 @@ asm {
 check_equals(o.b.c, 5);
 
 
-totals(27+15);
+_root.e = "hi";
+
+f = function() {
+    check_equals(e, "hi");
+    var e = "hello";
+    check_equals(e, "hello");
+    check_equals(_root.e, "hi");
+
+    ret = delete e;
+    xcheck_equals(ret, false);
+    xcheck_equals(e, "hello");
+    check_equals(_root.e, "hi");
+
+    ret = delete e;
+    xcheck_equals(ret, false);
+    xcheck_equals(e, "hello");
+    xcheck_equals(_root.e, "hi");
+};
+
+f();
+xcheck_equals(_root.e, "hi");
+ret = delete e;
+xcheck_equals(ret, true);
+check_equals(_root.e, undefined);
+
+totals(39+15);
 
 #else
 
-totals(27);
+totals(39);
 
 #endif

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


commit 2f6d0782b80160c3634ecca50e9bbd98e6296f6d
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Apr 28 08:35:57 2011 +0200

    Minor cleanups.
    
    Use references rather than pointers, avoid unnecessary copy.

diff --git a/libcore/Property.cpp b/libcore/Property.cpp
index 588bc6f..afd2882 100644
--- a/libcore/Property.cpp
+++ b/libcore/Property.cpp
@@ -103,13 +103,12 @@ Property::getValue(const as_object& this_ptr) const
             return boost::get<as_value>(_bound);
         case TYPE_GETTER_SETTER:
         {
-            const GetterSetter* a = boost::get<const GetterSetter>(&_bound);
+            const GetterSetter& a = boost::get<const GetterSetter>(_bound);
 
-            as_environment env(getVM(this_ptr));
+            const as_environment env(getVM(this_ptr));
             fn_call fn(const_cast<as_object*>(&this_ptr), env);
-            if (_destructive)
-            {
-                as_value ret = a->get(fn);
+            if (_destructive) {
+                const as_value& ret = a.get(fn);
                 // The getter might have called the setter, and we
                 // should not override.
                 if (_destructive) {
@@ -118,7 +117,7 @@ Property::getValue(const as_object& this_ptr) const
                 }
                 return ret;
             }
-            return a->get(fn);
+            return a.get(fn);
         }
        } 
     return as_value();
@@ -153,17 +152,17 @@ Property::setValue(as_object& this_ptr, const as_value& 
value) const
                 _bound = value;
             }
             else {
-                GetterSetter* a = boost::get<GetterSetter>(&_bound);
+                GetterSetter& a = boost::get<GetterSetter>(_bound);
 
-                as_environment env(getVM(this_ptr));
+                const as_environment env(getVM(this_ptr));
 
                 fn_call::Args args;
                 args += value;
 
                 fn_call fn(&this_ptr, env, args);
 
-                a->set(fn);
-                a->setCache(value);
+                a.set(fn);
+                a.setCache(value);
             }
     }
     return true;
diff --git a/libcore/as_object.cpp b/libcore/as_object.cpp
index 92b114c..c79cbf5 100644
--- a/libcore/as_object.cpp
+++ b/libcore/as_object.cpp
@@ -435,17 +435,12 @@ as_object::get_member(const ObjectURI& uri, as_value* val)
         *val = prop->getValue(*this);
         return true;
     }
-    catch (ActionLimitException& exc) {
-        // will be logged by outer catcher
-        throw;
-    }
-    catch (ActionTypeError& exc) {
+    catch (const ActionTypeError& exc) {
         IF_VERBOSE_ASCODING_ERRORS(
             log_aserror(_("Caught exception: %s"), exc.what());
             );
         return false;
     }
-
 }
 
 

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

Summary of changes:
 libcore/Property.cpp                 |   19 +++++++++----------
 libcore/as_object.cpp                |    7 +------
 testsuite/actionscript.all/delete.as |   29 +++++++++++++++++++++++++++--
 3 files changed, 37 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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