mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 994811 part 1. Add a ToJSValue overload for dictionary types. r=bholley
This commit is contained in:
parent
34e0756678
commit
42cd0463e8
@ -193,6 +193,16 @@ ToJSValue(JSContext* aCx,
|
|||||||
return ToJSValue(aCx, *aArgument.get(), aValue);
|
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
|
// Accept arrays of other things we accept
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool
|
bool
|
||||||
|
Loading…
Reference in New Issue
Block a user