Bug 1548133: mozilla::Variant::addTagToHash should be const-this. r=froydnj
authorJim Blandy <jimb@mozilla.com>
Wed, 01 May 2019 12:13:23 +0000
changeset 534797 1bd55e7d7d153ca0b84a0da4317fdd250f2439aa
parent 534796 61f88342d747ff580e1cc72f849e3156aff226f9
child 534798 40dad5764be780d7f1cae6e79075923386bd82f5
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1548133
milestone68.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 1548133: mozilla::Variant::addTagToHash should be const-this. r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D29423
mfbt/Variant.h
--- a/mfbt/Variant.h
+++ b/mfbt/Variant.h
@@ -761,17 +761,17 @@ class MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_
                         std::forward<Ms>(aMs)...);
   }
 
   /**
    * Incorporate the current variant's tag into hashValue.
    * Note that this does not hash the actual contents; you must take
    * care of that yourself, perhaps by using a match.
    */
-  mozilla::HashNumber addTagToHash(mozilla::HashNumber hashValue) {
+  mozilla::HashNumber addTagToHash(mozilla::HashNumber hashValue) const {
     return mozilla::AddToHash(hashValue, tag);
   }
 };
 
 /*
  * AsVariant() is used to construct a Variant<T,...> value containing the
  * provided T value using type inference. It can be used to construct Variant
  * values in expressions or return them from functions without specifying the