Bug 1011109 - Don't allow Rooted<nsXBLMaybeCompiled<T>> to compile r=sfink
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 16 May 2014 10:00:44 +0100
changeset 183498 8475dbade7b3cb2f748e4deada61710325c28001
parent 183497 67f5286dda31cd67d55396c5973c46d301049910
child 183499 e5b1060172bea7860ca6cc040159cadf57d218d8
push id26793
push userryanvm@gmail.com
push dateFri, 16 May 2014 18:53:54 +0000
treeherdermozilla-central@eb2a6f7785a2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1011109
milestone32.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 1011109 - Don't allow Rooted<nsXBLMaybeCompiled<T>> to compile r=sfink
dom/xbl/nsXBLMaybeCompiled.h
--- a/dom/xbl/nsXBLMaybeCompiled.h
+++ b/dom/xbl/nsXBLMaybeCompiled.h
@@ -77,22 +77,27 @@ private:
 
   friend class js::GCMethods<nsXBLMaybeCompiled<UncompiledT> >;
 };
 
 /* Add support for JS::Heap<nsXBLMaybeCompiled>. */
 namespace js {
 
 template <class UncompiledT>
-struct GCMethods<nsXBLMaybeCompiled<UncompiledT> > : public GCMethods<JSObject *>
+struct GCMethods<nsXBLMaybeCompiled<UncompiledT> >
 {
   typedef struct GCMethods<JSObject *> Base;
 
   static nsXBLMaybeCompiled<UncompiledT> initial() { return nsXBLMaybeCompiled<UncompiledT>(); }
 
+  /*
+   * No implementation of kind() is provided to prevent
+   * Root<nsXBLMaybeCompiled<UncompiledT>> from being used.
+   */
+
   static bool poisoned(nsXBLMaybeCompiled<UncompiledT> function)
   {
     return function.IsCompiled() && Base::poisoned(function.GetJSFunction());
   }
 
   static bool needsPostBarrier(nsXBLMaybeCompiled<UncompiledT> function)
   {
     return function.IsCompiled() && Base::needsPostBarrier(function.GetJSFunction());