Browse Source

We do not need to compare CallExpression for equality

auz34 11 years ago
parent
commit
b650114c0e
1 changed files with 2 additions and 4 deletions
  1. 2 4
      Jint/Runtime/CallStack/CallStackElementComparer.cs

+ 2 - 4
Jint/Runtime/CallStack/CallStackElementComparer.cs

@@ -6,14 +6,12 @@
     {
         public bool Equals(CallStackElement x, CallStackElement y)
         {
-            return x.CallExpression == y.CallExpression || x.Function == y.Function;
+            return x.Function == y.Function;
         }
 
         public int GetHashCode(CallStackElement obj)
         {
-            // TO DO have not found good hash function yet
-            // not sure it can be done for OR logic
-            return 0;
+            return obj.Function.GetHashCode();
         }
     }
 }