[xpcom] Implement variant support also in getJSValueFromIter()
authorKalle Vahlman <kalle.vahlman@movial.com>
Wed, 22 Apr 2009 05:20:46 +0000 (08:20 +0300)
committerKalle Vahlman <kalle.vahlman@movial.com>
Wed, 22 Apr 2009 05:20:46 +0000 (08:20 +0300)
xpcom-dbusservice/DBusMarshaling.cpp

index 5f901fa0d0a3d5106f08f05ad6f41a4f3f8fd9ec..df192a8b9ea0f088b922d032d8c22f5704a742d1 100644 (file)
@@ -1053,6 +1053,15 @@ void getJSValueFromIter(JSContext* cx, DBusMessageIter *aIter, int aDBusType, js
             }
             break;
         }
+        case DBUS_TYPE_VARIANT:
+        {
+            DBusMessageIter variantIter;
+            dbus_message_iter_recurse(aIter, &variantIter);
+            getJSValueFromIter(cx, &variantIter,
+                               dbus_message_iter_get_arg_type(&variantIter),
+                               v);
+            break;
+        }
         case DBUS_TYPE_STRUCT:
         default:
         {