[webkit-changes] cvs commit: JavaScriptCore/kjs operations.cpp

Anders andersca at opensource.apple.com
Thu Dec 29 00:18:41 PST 2005


andersca    05/12/29 00:18:40

  Modified:    .        ChangeLog
               kjs      operations.cpp
  Log:
  2005-12-28  Anders Carlsson  <andersca at mac.com>
  
          Reviewed by Maciej.
  
          - The JSC part of http://bugzilla.opendarwin.org/show_bug.cgi?id=6268
          Add undetectable document.all
  
          * kjs/operations.cpp:
          (KJS::equal):
          When comparing an object with null or undefined, call toPrimitive with
          NullType as the preferred type.
  
  Revision  Changes    Path
  1.936     +12 -0     JavaScriptCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
  retrieving revision 1.935
  retrieving revision 1.936
  diff -u -r1.935 -r1.936
  --- ChangeLog	27 Dec 2005 20:01:58 -0000	1.935
  +++ ChangeLog	29 Dec 2005 08:18:39 -0000	1.936
  @@ -1,3 +1,15 @@
  +2005-12-28  Anders Carlsson  <andersca at mac.com>
  +
  +        Reviewed by Maciej.
  +
  +        - The JSC part of http://bugzilla.opendarwin.org/show_bug.cgi?id=6268
  +        Add undetectable document.all
  +        
  +        * kjs/operations.cpp:
  +        (KJS::equal):
  +        When comparing an object with null or undefined, call toPrimitive with 
  +        NullType as the preferred type.
  +
   2005-12-27  Anders Carlsson  <andersca at mac.com>
   
           Reviewed by Darin.
  
  
  
  1.15      +4 -0      JavaScriptCore/kjs/operations.cpp
  
  Index: operations.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/operations.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- operations.cpp	11 Dec 2005 02:05:46 -0000	1.14
  +++ operations.cpp	29 Dec 2005 08:18:40 -0000	1.15
  @@ -129,8 +129,12 @@
           } else {
               if ((t1 == StringType || t1 == NumberType) && t2 >= ObjectType)
                   return equal(exec, v1, v2->toPrimitive(exec));
  +            if (t1 == NullType && t2 >= ObjectType)
  +                return equal(exec, v1, v2->toPrimitive(exec, NullType));
               if (t1 >= ObjectType && (t2 == StringType || t2 == NumberType))
                   return equal(exec, v1->toPrimitive(exec), v2);
  +            if (t1 >= ObjectType && t2 == NullType)
  +                return equal(exec, v1->toPrimitive(exec, NullType), v2);
               if (t1 != t2)
                   return false;
           }
  
  
  



More information about the webkit-changes mailing list