Bug 1000264 - Allow an object that inherits from nsWrapperCache but not nsISupports to be passed as a Promise::MaybeResolve argument. r=bz

--HG--
extra : rebase_source : 3bab4f00e3949b83a6914ab8ade63f8390b818cd
This commit is contained in:
Paul Adenot 2014-10-22 19:26:10 +02:00
parent 6322eded61
commit 5a37d306d4

View File

@ -138,11 +138,10 @@ ToJSValue(JSContext* aCx,
return MaybeWrapValue(aCx, aValue);
}
// Accept objects that inherit from nsWrapperCache and nsISupports (e.g. most
// Accept objects that inherit from nsWrapperCache (e.g. most
// DOM objects).
template <class T>
typename EnableIf<IsBaseOf<nsWrapperCache, T>::value &&
IsBaseOf<nsISupports, T>::value, bool>::Type
typename EnableIf<IsBaseOf<nsWrapperCache, T>::value, bool>::Type
ToJSValue(JSContext* aCx,
T& aArgument,
JS::MutableHandle<JS::Value> aValue)