Bug 1298768 - Compare mLocalURLFlag in URLValueData comparison functions. r=cjku
authorCameron McCormack <cam@mcc.id.au>
Sat, 03 Sep 2016 00:22:47 +1000
changeset 312440 e89e213ef1facaf2d3c9cf4b0920f52ba269a3e3
parent 312439 bdf79acb0726bf6e46453d3c94ad1df63a53b3ee
child 312441 d91354854339f34daf412da475bf3293cc75ef76
push id20447
push userkwierso@gmail.com
push dateFri, 02 Sep 2016 20:36:44 +0000
treeherderfx-team@969397f22187 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjku
bugs1298768
milestone51.0a1
Bug 1298768 - Compare mLocalURLFlag in URLValueData comparison functions. r=cjku MozReview-Commit-ID: OdrbMUnaqt
layout/style/nsCSSValue.cpp
--- a/layout/style/nsCSSValue.cpp
+++ b/layout/style/nsCSSValue.cpp
@@ -2629,17 +2629,18 @@ css::URLValueData::operator==(const URLV
   auto& other = const_cast<URLValueData&>(aOther);
   return NS_strcmp(nsCSSValue::GetBufferValue(mString),
                    nsCSSValue::GetBufferValue(aOther.mString)) == 0 &&
           (GetURI() == aOther.GetURI() || // handles null == null
            (mURI && aOther.mURI &&
             NS_SUCCEEDED(mURI->Equals(aOther.mURI, &eq)) &&
             eq)) &&
           (mOriginPrincipal == aOther.mOriginPrincipal ||
-           self.mOriginPrincipal.get()->Equals(other.mOriginPrincipal.get()));
+           self.mOriginPrincipal.get()->Equals(other.mOriginPrincipal.get())) &&
+          mLocalURLFlag == aOther.mLocalURLFlag;
 }
 
 bool
 css::URLValueData::MaybeUnresolvedURIEquals(const URLValueData& aOther) const
 {
   if (!mURIResolved || !aOther.mURIResolved) {
     return false;
   }
@@ -2658,17 +2659,18 @@ css::URLValueData::URIEquals(const URLVa
   auto& other = const_cast<URLValueData&>(aOther);
   // Worth comparing GetURI() to aOther.GetURI() and mOriginPrincipal to
   // aOther.mOriginPrincipal, because in the (probably common) case when this
   // value was one of the ones that in fact did not change this will be our
   // fast path to equality
   return (mURI == aOther.mURI ||
           (NS_SUCCEEDED(mURI->Equals(aOther.mURI, &eq)) && eq)) &&
          (mOriginPrincipal == aOther.mOriginPrincipal ||
-          self.mOriginPrincipal.get()->Equals(other.mOriginPrincipal.get()));
+          self.mOriginPrincipal.get()->Equals(other.mOriginPrincipal.get())) &&
+         mLocalURLFlag == aOther.mLocalURLFlag;
 }
 
 nsIURI*
 css::URLValueData::GetURI() const
 {
   if (!mURIResolved) {
     mURIResolved = true;
     // Be careful to not null out mURI before we've passed it as the base URI