Commit ba2ac04f authored by Nicholas Nethercote's avatar Nicholas Nethercote
Browse files

Bug 1442433 - Make nsAtom::mString even more const. r=froydnj


MozReview-Commit-ID: ANm2nrnO4Lb

--HG--
extra : rebase_source : 444f72316f047004cddfc2eef947b122db1cb87d
parent 9bc7f17b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ public:
  {
    // See the comment on |mString|'s declaration.
    MOZ_ASSERT(IsDynamicAtom() || IsHTML5Atom());
    return nsStringBuffer::FromData(mString);
    return nsStringBuffer::FromData(const_cast<char16_t*>(mString));
  }

  // A hashcode that is better distributed than the actual atom pointer, for
@@ -99,7 +99,7 @@ protected:
  // non-static atoms it points to the chars in an nsStringBuffer. This means
  // that nsStringBuffer::FromData(mString) calls are only valid for non-static
  // atoms.
  char16_t* const mString;
  const char16_t* const mString;
};

// A trivial subclass of nsAtom that can be used for known static atoms. The