Backed out changeset a71cde237471 (bug 1302470) for failing mochitests browser_Finder.js and test_browserElement_inproc_Find.html and various test failures in mochitest c3 on Linux x64 asan and debug (at least). r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 17 Nov 2016 17:51:24 +0100
changeset 323045 5c0e1535fc906ba614f7092a2a735c33670331a0
parent 323044 e8dd85621a7daeceba293bb7b6c1ccb76bce8e3e
child 323046 811084dd7ec0b2d0049e570d7b6eac66a840ab99
push id21
push usermaklebus@msu.edu
push dateThu, 01 Dec 2016 06:22:08 +0000
reviewersbackout
bugs1302470
milestone53.0a1
backs outa71cde2374715864e0f66879a3f2af5b954a5bd7
Backed out changeset a71cde237471 (bug 1302470) for failing mochitests browser_Finder.js and test_browserElement_inproc_Find.html and various test failures in mochitest c3 on Linux x64 asan and debug (at least). r=backout
toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
toolkit/components/typeaheadfind/nsTypeAheadFind.h
--- a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
+++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
@@ -417,17 +417,17 @@ nsTypeAheadFind::FindItNow(nsIPresShell 
     return NS_ERROR_FAILURE;
 
   mFind->SetFindBackwards(aFindPrev);
 
   while (true) {    // ----- Outer while loop: go through all docs -----
     while (true) {  // === Inner while loop: go through a single doc ===
       mFind->Find(mTypeAheadBuffer.get(), mSearchRange, mStartPointRange,
                   mEndPointRange, getter_AddRefs(returnRange));
-
+      
       if (!returnRange)
         break;  // Nothing found in this doc, go to outer loop (try next doc)
 
       // ------- Test resulting found range for success conditions ------
       bool isInsideLink = false, isStartingLink = false;
 
       if (aIsLinksOnly) {
         // Don't check if inside link when searching all text
@@ -1003,28 +1003,28 @@ nsTypeAheadFind::Find(const nsAString& a
     // is typed
     mStartFindRange = nullptr;
     mSelectionController = nullptr;
 
     *aResult = FIND_FOUND;
     return NS_OK;
   }
 
-  bool atEnd = false;
+  bool atEnd = false;    
   if (mTypeAheadBuffer.Length()) {
     const nsAString& oldStr = Substring(mTypeAheadBuffer, 0, mTypeAheadBuffer.Length());
     const nsAString& newStr = Substring(aSearchString, 0, mTypeAheadBuffer.Length());
     if (oldStr.Equals(newStr))
       atEnd = true;
-
+  
     const nsAString& newStr2 = Substring(aSearchString, 0, aSearchString.Length());
     const nsAString& oldStr2 = Substring(mTypeAheadBuffer, 0, aSearchString.Length());
     if (oldStr2.Equals(newStr2))
       atEnd = true;
-
+    
     if (!atEnd)
       mStartFindRange = nullptr;
   }
 
   if (!mIsSoundInitialized && !mNotFoundSoundURL.IsEmpty()) {
     // This makes sure system sound library is loaded so that
     // there's no lag before the first sound is played
     // by waiting for the first keystroke, we still get the startup time benefits.
--- a/toolkit/components/typeaheadfind/nsTypeAheadFind.h
+++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.h
@@ -90,17 +90,17 @@ protected:
   // mLastFindLength is the character length of the last find string.  It is used for
   // disabling the "not found" sound when using backspace or delete
   uint32_t mLastFindLength;
 
   // Sound is played asynchronously on some platforms.
   // If we destroy mSoundInterface before sound has played, it won't play
   nsCOMPtr<nsISound> mSoundInterface;
   bool mIsSoundInitialized;
-
+  
   // where selection was when user started the find
   nsCOMPtr<nsIDOMRange> mStartFindRange;
   nsCOMPtr<nsIDOMRange> mSearchRange;
   nsCOMPtr<nsIDOMRange> mStartPointRange;
   nsCOMPtr<nsIDOMRange> mEndPointRange;
 
   // Cached useful interfaces
   nsCOMPtr<nsIFind> mFind;