Fixed <rdar://problem/3821515> binding layer needs to convert NSNumber-bools...
authorrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2004 21:38:13 +0000 (21:38 +0000)
committerrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2004 21:38:13 +0000 (21:38 +0000)
        Reviewed by Ken.

        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertObjcValueToValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7771 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/bindings/objc/objc_utility.mm

index 46c83c367d29b0037551b1d51a9d8bec36ef2af7..021d7206e3d8fb572639b30b49cedd8bdd3e9d2c 100644 (file)
@@ -1,3 +1,12 @@
+2004-10-05  Richard Williamson   <rjw@apple.com>
+
+        Fixed <rdar://problem/3821515> binding layer needs to convert NSNumber-bools to js type boolean not number
+
+        Reviewed by Ken.
+
+        * bindings/objc/objc_utility.mm:
+        (KJS::Bindings::convertObjcValueToValue):
+
 2004-10-04  Darin Adler  <darin@apple.com>
 
         Reviewed by Ken.
index 5ee5f7dcaa44c51f4ad718fb9243164a9341d318..b902929bc0f6eece81c1823e6883e11ae979375f 100644 (file)
@@ -204,6 +204,12 @@ Value KJS::Bindings::convertObjcValueToValue (KJS::ExecState *exec, void *buffer
                     WebScriptObject *jsobject = (WebScriptObject *)*obj;
                     aValue = Object([jsobject _imp]);
                 }
+                else if ((CFBooleanRef)*obj == kCFBooleanTrue) {
+                    aValue = Boolean(true);
+                }
+                else if ((CFBooleanRef)*obj == kCFBooleanFalse) {
+                    aValue = Boolean(false);
+                }
                 else if (*obj == 0) {
                     return Undefined();
                 }