diff --git a/dom/bindings/ToJSValue.h b/dom/bindings/ToJSValue.h index 23d0e144fbd..fdbf52f78d4 100644 --- a/dom/bindings/ToJSValue.h +++ b/dom/bindings/ToJSValue.h @@ -193,6 +193,16 @@ ToJSValue(JSContext* aCx, return ToJSValue(aCx, *aArgument.get(), aValue); } +// Accept WebIDL dictionaries +template +typename EnableIf::value, bool>::Type +ToJSValue(JSContext* aCx, + const T& aArgument, + JS::MutableHandle aValue) +{ + return aArgument.ToObject(aCx, aValue); +} + // Accept arrays of other things we accept template bool