Fixed <rdar://problem/3821515> binding layer needs to convert NSNumber-bools...
[WebKit-https.git] / JavaScriptCore / bindings / objc / objc_utility.mm
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]);
                 }
                     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();
                 }
                 else if (*obj == 0) {
                     return Undefined();
                 }