gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Func...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Func...
Date: Thu, 14 Jun 2007 13:58:29 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/06/14 13:58:29

Modified files:
        .              : ChangeLog 
        testsuite/actionscript.all: Function.as 

Log message:
                * testsuite/actionscript.all/Function.as: test local vars scope 
of
                  outer function to be kept alive by inner functions.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3541&r2=1.3542
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Function.as?cvsroot=gnash&r1=1.49&r2=1.50

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3541
retrieving revision 1.3542
diff -u -b -r1.3541 -r1.3542
--- ChangeLog   14 Jun 2007 10:57:06 -0000      1.3541
+++ ChangeLog   14 Jun 2007 13:58:28 -0000      1.3542
@@ -1,5 +1,7 @@
 2007-06-14 Sandro Santilli <address@hidden>
 
+       * testsuite/actionscript.all/Function.as: test local vars scope of
+         outer function to be kept alive by inner functions.
        * libbase/ref_counted.h: made destructor protected, to ensure no 
          user is explicitly deleting a ref_counted object (propedeutic
          to GC)

Index: testsuite/actionscript.all/Function.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Function.as,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- testsuite/actionscript.all/Function.as      28 Apr 2007 07:22:43 -0000      
1.49
+++ testsuite/actionscript.all/Function.as      14 Jun 2007 13:58:29 -0000      
1.50
@@ -20,7 +20,7 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: Function.as,v 1.49 2007/04/28 07:22:43 strk Exp $";
+rcsid="$Id: Function.as,v 1.50 2007/06/14 13:58:29 strk Exp $";
 
 #include "check.as"
 
@@ -678,3 +678,21 @@
 o.valueOf = function() { return _root; };
 check_equals(_root, o);
 check_equals(o, _root);
+
+//-----------------------------------------------------------------------------
+// Test local vars scope of outer function to be kept alive by inner functions
+//-----------------------------------------------------------------------------
+
+foo = function () {
+       var x = 42;
+       return function () { return x; }; 
+};
+
+f = foo();
+delete foo;
+#if OUTPUT_VERSION > 5
+check_equals(f(), 42);
+#else
+check_equals(typeof(f()), 'undefined');
+#endif
+




reply via email to

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