gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash/server as_value.cpp


From: Sandro Santilli
Subject: [Gnash-commit] gnash/server as_value.cpp
Date: Thu, 26 Apr 2007 10:28:53 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/04/26 10:28:53

Modified files:
        server         : as_value.cpp 

Log message:
        (equals) don't recurse if the primitive value of a function is an 
object or vice-versa

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_value.cpp?cvsroot=gnash&r1=1.46&r2=1.47

Patches:
Index: as_value.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/as_value.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- as_value.cpp        26 Apr 2007 10:17:56 -0000      1.46
+++ as_value.cpp        26 Apr 2007 10:28:53 -0000      1.47
@@ -670,8 +670,8 @@
        assert ( ! (v.m_type == OBJECT || v.m_type == AS_FUNCTION) );
        // convert this value to a primitive and recurse
        if ( ! env ) return false;
-       as_value v2 = to_primitive(*env); // TODO: should forward environment ?
-       if ( v2.m_type == m_type ) return false; // no conversion 
+       as_value v2 = to_primitive(*env); 
+       if ( v2.m_type == OBJECT || v2.m_type == AS_FUNCTION ) return false; // 
no valid conversion 
        else return v2.equals(v, env);
     }
 
@@ -680,8 +680,8 @@
        assert ( ! (m_type == OBJECT || m_type == AS_FUNCTION) );
        // convert this value to a primitive and recurse
        if ( ! env ) return false;
-       as_value v2 = v.to_primitive(*env); // TODO: should forward environment 
?
-       if ( v2.m_type == v.m_type ) return false; // no conversion 
+       as_value v2 = v.to_primitive(*env); 
+       if ( v2.m_type == OBJECT || v2.m_type == AS_FUNCTION ) return false; // 
no valid conversion 
        else return equals(v2, env);
     }
 




reply via email to

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