Backed out changeset a91ccbe2b3fd (bug 1483449) for failures at nsStaticAtomUtils.h:25. CLOSED TREE
authorCsoregi Natalia <ncsoregi@mozilla.com>
Thu, 16 Aug 2018 05:11:46 +0300
changeset 486965 280d5dade1c6296b232fcf876a1ece7a8cf79784
parent 486964 7080672c7b8e659ffecf3ea8a7cb1d28888f8fc7
child 486966 7de9496d9640c757f486c8fe80e0679ed78d3cf2
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1483449
milestone63.0a1
backs outa91ccbe2b3fd8b9303b034d7a6035de572495fd0
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
Backed out changeset a91ccbe2b3fd (bug 1483449) for failures at nsStaticAtomUtils.h:25. CLOSED TREE
xpcom/ds/nsStaticAtomUtils.h
--- a/xpcom/ds/nsStaticAtomUtils.h
+++ b/xpcom/ds/nsStaticAtomUtils.h
@@ -8,27 +8,25 @@
 #define nsStaticAtomUtils_h
 
 #include <stdint.h>
 #include "nsAtom.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Maybe.h"
 
 // This class holds basic operations on arrays of static atoms.
-class nsStaticAtomUtils
-{
+class nsStaticAtomUtils {
 public:
   static mozilla::Maybe<uint32_t> Lookup(nsAtom* aAtom,
                                          const nsStaticAtom* aAtoms,
                                          uint32_t aCount)
   {
-    if (aAtom->IsStatic()) {
-      ptrdiff_t index = aAtom->AsStatic() - aAtoms;
-      if (index >= 0 && index < aCount) {
-        return mozilla::Some(static_cast<uint32_t>(index));
+    for (uint32_t i = 0; i < aCount; i++) {
+      if (aAtom == &aAtoms[i]) {
+        return mozilla::Some(i);
       }
     }
     return mozilla::Nothing();
   }
 
   static bool IsMember(nsAtom* aAtom, const nsStaticAtom* aAtoms,
                        uint32_t aCount)
   {