Bug 1000264 - Allow an object that inherits from nsWrapperCache but not nsISupports to be passed as a Promise::MaybeResolve argument. r=bz
☠☠ backed out by 292ed84594c1 ☠ ☠
authorPaul Adenot <paul@paul.cx>
Wed, 22 Oct 2014 19:26:10 +0200
changeset 215531 48870019451923babe374d084bd3fa2d01589840
parent 215530 76fdd0f934c191a3ca2d050e81cad97f2b1298a6
child 215532 c2c37b2e9fac22a76ce98221e1cf12988dc6a7a5
push id27818
push userryanvm@gmail.com
push dateThu, 13 Nov 2014 20:19:09 +0000
treeherdermozilla-central@292ed84594c1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1000264
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1000264 - Allow an object that inherits from nsWrapperCache but not nsISupports to be passed as a Promise::MaybeResolve argument. r=bz
dom/bindings/ToJSValue.h
--- a/dom/bindings/ToJSValue.h
+++ b/dom/bindings/ToJSValue.h
@@ -133,21 +133,20 @@ ToJSValue(JSContext* aCx,
   // Make sure we're called in a compartment
   MOZ_ASSERT(JS::CurrentGlobalOrNull(aCx));
 
   aValue.setObject(*aArgument.Callback());
 
   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)
 {
   // Make sure we're called in a compartment
   MOZ_ASSERT(JS::CurrentGlobalOrNull(aCx));
   // Make sure non-webidl objects don't sneak in here
   MOZ_ASSERT(aArgument.IsDOMBinding());