Bug 1291478 - Add virtual destructor to CustomAutoRooter to slience compiler warnings r=terrence
authorJon Coppeard <jcoppeard@mozilla.com>
Thu, 04 Aug 2016 10:48:54 +0100
changeset 308235 0c5cb3940888fa96e01149c33df31437e3bf0941
parent 308234 b09cad2800f9ccac6c464ed33f4897bb52241b0e
child 308236 498fd4aae629ef21ee46cb494f37ccab414b14ab
push id31092
push usercbook@mozilla.com
push dateFri, 05 Aug 2016 10:16:59 +0000
treeherderautoland@b97dd7dd3cb9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs1291478
milestone51.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 1291478 - Add virtual destructor to CustomAutoRooter to slience compiler warnings r=terrence
js/src/jsapi.h
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -461,16 +461,18 @@ class MOZ_RAII JS_PUBLIC_API(CustomAutoR
       : AutoGCRooter(cx, CUSTOM)
     {
         MOZ_GUARD_OBJECT_NOTIFIER_INIT;
     }
 
     friend void AutoGCRooter::trace(JSTracer* trc);
 
   protected:
+    virtual ~CustomAutoRooter() {}
+
     /** Supplied by derived class to trace roots. */
     virtual void trace(JSTracer* trc) = 0;
 
   private:
     MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
 };
 
 /** A handle to an array of rooted values. */