gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/swf_function.cpp


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/swf_function.cpp
Date: Sat, 17 Mar 2007 17:55:31 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/03/17 17:55:31

Modified files:
        .              : ChangeLog 
        server         : swf_function.cpp 

Log message:
                * server/swf_function.cpp (call operator): don't
                  provide 'super' if SWF version is < 6.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2618&r2=1.2619
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf_function.cpp?cvsroot=gnash&r1=1.22&r2=1.23

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2618
retrieving revision 1.2619
diff -u -b -r1.2618 -r1.2619
--- ChangeLog   17 Mar 2007 11:33:02 -0000      1.2618
+++ ChangeLog   17 Mar 2007 17:55:31 -0000      1.2619
@@ -1,3 +1,8 @@
+2007-03-17 Sandro Santilli <address@hidden>
+
+       * server/swf_function.cpp (call operator): don't
+         provide 'super' if SWF version is < 6.
+
 2007-03-17 Markus Gothe <address@hidden>
 
        * libamf/amf.h: Fixed a naming issue on non-GCC.

Index: server/swf_function.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/swf_function.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- server/swf_function.cpp     6 Mar 2007 16:05:18 -0000       1.22
+++ server/swf_function.cpp     17 Mar 2007 17:55:31 -0000      1.23
@@ -180,6 +180,9 @@
        // Set up local stack frame, for parameters and locals.
        our_env->pushCallFrame(this);
 
+       // Some features are version-dependant
+       unsigned swfversion = VM::get().getSWFVersion();
+
        if (m_is_function2 == false)
        {
                // Conventional function.
@@ -196,9 +199,12 @@
                assert(fn.this_ptr);
                our_env->set_local("this", fn.this_ptr);
 
-               // Add 'super'
+               // Add 'super' (SWF6+ only)
+               if ( swfversion > 5 )
+               {
                as_object* super = getSuper(*(fn.this_ptr));
                our_env->set_local("super", super);
+               }
 
                // Add 'arguments'
                our_env->set_local("arguments", getArguments(*this, fn));
@@ -272,9 +278,9 @@
                        our_env->add_local("arguments", 
as_value(arg_array.get()));
                }
 
-               if (m_function2_flags & PRELOAD_SUPER)
+               if ( (m_function2_flags & PRELOAD_SUPER) && swfversion > 5)
                {
-                       // Put 'super' in a register.
+                       // Put 'super' in a register (SWF6+ only).
                        
our_env->local_register(current_reg).set_as_object(getSuper(*(fn.this_ptr)));
                        current_reg++;
                }
@@ -283,9 +289,9 @@
                {
                        // Don't put 'super' in a local var.
                }
-               else
+               else if ( swfversion > 5 )
                {
-                       // Put 'super' in a local var.
+                       // Put 'super' in a local var (SWF6+ only)
                        our_env->add_local("super", 
as_value(getSuper(*(fn.this_ptr))));
                }
 




reply via email to

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