gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog libamf/amf.cpp server/vm/Action...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog libamf/amf.cpp server/vm/Action...
Date: Sat, 17 May 2008 20:10:40 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  08/05/17 20:10:38

Modified files:
        .              : ChangeLog 
        libamf         : amf.cpp 
        server/vm      : ActionExec.cpp 
        testsuite/swfdec: PASSING 

Log message:
        * server/vm/ActionExec.cpp (setLocalVariable): use scope stack
          when out of a function context (as comment suggested).
        * testsuite/swfdec/PASSING: definelocal-scope.as in all versions.
        
        Backport or not backport ? I'd be for yes.
        BTW, it's incredible we didn't have a test for this !

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6635&r2=1.6636
http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/amf.cpp?cvsroot=gnash&r1=1.79&r2=1.80
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ActionExec.cpp?cvsroot=gnash&r1=1.73&r2=1.74
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/swfdec/PASSING?cvsroot=gnash&r1=1.140&r2=1.141

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6635
retrieving revision 1.6636
diff -u -b -r1.6635 -r1.6636
--- ChangeLog   17 May 2008 17:31:32 -0000      1.6635
+++ ChangeLog   17 May 2008 20:10:33 -0000      1.6636
@@ -1,3 +1,9 @@
+2008-05-17 Sandro Santilli <address@hidden>
+
+       * server/vm/ActionExec.cpp (setLocalVariable): use scope stack
+         when out of a function context (as comment suggested).
+       * testsuite/swfdec/PASSING: definelocal-scope.as in all versions.
+
 2008-05-17 Benjamin Wolsey <address@hidden>
 
        * server/asobj/NetStreamGst.cpp: replace rint with std::floor

Index: libamf/amf.cpp
===================================================================
RCS file: /sources/gnash/gnash/libamf/amf.cpp,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -b -r1.79 -r1.80
--- libamf/amf.cpp      16 May 2008 03:46:17 -0000      1.79
+++ libamf/amf.cpp      17 May 2008 20:10:36 -0000      1.80
@@ -814,7 +814,7 @@
     
     // name is just debugging help to print cleaner, and should be removed 
later
     log_debug(_("AMF property name length is: %d"), length);
-    const char *name = strndup(reinterpret_cast<const char *>(tmpptr), length);
+    std::string name(reinterpret_cast<const char *>(tmpptr), length);
     log_debug(_("AMF property name is: %s"), name);
 
     Element *el = 0;
@@ -823,7 +823,7 @@
     if (*(tmpptr+length) == Element::NULL_AMF0) {
        log_debug("No data associated with Property \"%s\"", name);
        el = new Element;
-       el->setName(name, length);
+       el->setName(name.c_str(), length);
        tmpptr += length + 1;
        // Calculate the offset for the next read
     } else {
@@ -833,12 +833,12 @@
        tmpptr += length;
        el = extractAMF(tmpptr, tooFar);
        if (el) {
-           el->setName(name, length);
+           el->setName(name.c_str(), length);
            tmpptr += totalsize();
        }
     }
 
-    delete name;
+    //delete name;
     
     // Calculate the offset for the next read
     _totalsize = (tmpptr - in);

Index: server/vm/ActionExec.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ActionExec.cpp,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -b -r1.73 -r1.74
--- server/vm/ActionExec.cpp    7 May 2008 20:59:30 -0000       1.73
+++ server/vm/ActionExec.cpp    17 May 2008 20:10:37 -0000      1.74
@@ -585,7 +585,7 @@
        } else {
            // TODO: set target member  ?
            //       what about 'with' stack ?
-           env.set_variable(PROPNAME(name), val);
+           env.set_variable(PROPNAME(name), val, getScopeStack());
        }
 }
 

Index: testsuite/swfdec/PASSING
===================================================================
RCS file: /sources/gnash/gnash/testsuite/swfdec/PASSING,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -b -r1.140 -r1.141
--- testsuite/swfdec/PASSING    15 May 2008 13:24:40 -0000      1.140
+++ testsuite/swfdec/PASSING    17 May 2008 20:10:38 -0000      1.141
@@ -228,6 +228,10 @@
 definelocal-overwrite-6.swf:d18599e0a175346c51bd652b7698f8f0
 definelocal-overwrite-7.swf:edd40b414c044960f0399420aa9094b2
 definelocal-overwrite-8.swf:70928fda2df52bc38f21a0924ccc21e4
+definelocal-scope-5.swf:410889e2d2f93276df9b9457015d8b93
+definelocal-scope-6.swf:4b8cf913f288970c194ddbf313ddf85d
+definelocal-scope-7.swf:9f5965479c6edd3af7e39fb39bff864f
+definelocal-scope-8.swf:ed639f7eb13c9bd38f982b254594b639
 definelocal-target-5.swf:3183c10126c7ad48af0bced705618537
 definelocal-target-6.swf:6ee9c80bd0f9b964d57d4b5b6b6362d4
 definelocal-target-7.swf:c180bc361cfc85feadb152b394267f68




reply via email to

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