Bug 994811 part 1. Add a ToJSValue overload for dictionary types. r=bholley

This commit is contained in:
Boris Zbarsky 2014-04-11 22:20:52 -04:00
parent 34e0756678
commit 42cd0463e8

View File

@ -193,6 +193,16 @@ ToJSValue(JSContext* aCx,
return ToJSValue(aCx, *aArgument.get(), aValue);
}
// Accept WebIDL dictionaries
template <class T>
typename EnableIf<IsBaseOf<DictionaryBase, T>::value, bool>::Type
ToJSValue(JSContext* aCx,
const T& aArgument,
JS::MutableHandle<JS::Value> aValue)
{
return aArgument.ToObject(aCx, aValue);
}
// Accept arrays of other things we accept
template <typename T>
bool