Fixed <rdar://problem/4053276> WebScripting protocol in WebKit cannot convert Boolea...
authorrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Mar 2005 23:52:26 +0000 (23:52 +0000)
committerrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Mar 2005 23:52:26 +0000 (23:52 +0000)
Added JavaScript boolean to type that can be converted to
ObjC scalar parameters.

        Reviewed by Ken Kocienda.

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

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

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

index a4c1c6d2ac21cfc9582f6b88c534a1feca34f509..7384822132aaff27e9564a5be85c61f4e02f4ad6 100644 (file)
@@ -1,3 +1,15 @@
+2005-03-15  Richard Williamson   <rjw@apple.com>
+
+       Fixed <rdar://problem/4053276> WebScripting protocol in WebKit cannot convert Boolean in Javascript to BOOL in Objective-C
+
+       Added JavaScript boolean to type that can be converted to
+       ObjC scalar parameters.
+
+        Reviewed by Ken Kocienda.
+
+        * bindings/objc/objc_utility.mm:
+        (KJS::Bindings::convertValueToObjcValue):
+
 === Safari-406 ===
 
 === Safari-405 ===
index b8440ff98dd6decefcdbf082fa34a23b431e84c6..82113dfcab45bf0a52320e4d8f1d09a1f2aff0db 100644 (file)
@@ -92,7 +92,7 @@ ObjcValue KJS::Bindings::convertValueToObjcValue (KJS::ExecState *exec, const KJ
     ObjcValue result;
     double d = 0;
    
-    if (value.type() == NumberType || value.type() == StringType)
+    if (value.type() == NumberType || value.type() == StringType || value.type() == BooleanType)
        d = value.toNumber(exec);
        
     switch (type){