Bug 1342880 : Remove class inSearchLoop from the tree. r=heycam
authorAstley Chen <aschen@mozilla.com>
Wed, 15 Mar 2017 11:48:41 +0800
changeset 347645 e511e1218d7f3f7fb912fde0100377bd59e7175c
parent 347644 2672f4d4b38deef0e5da7088f1817555d461d29d
child 347646 b41b2d89ff0205cea2f5b21a5a3b7060b70a3629
push id31501
push usercbook@mozilla.com
push dateWed, 15 Mar 2017 12:01:05 +0000
treeherdermozilla-central@0cc9dced786c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1342880
milestone55.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 1342880 : Remove class inSearchLoop from the tree. r=heycam inSearchLoop is referenced from nowhere, as a result, we don't need to get its timer event labeled. MozReview-Commit-ID: 5fxg38WD9dQ
layout/inspector/inSearchLoop.cpp
layout/inspector/inSearchLoop.h
layout/inspector/moz.build
deleted file mode 100644
--- a/layout/inspector/inSearchLoop.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "inSearchLoop.h"
-
-#include "nsITimer.h"
-#include "nsIServiceManager.h"
-///////////////////////////////////////////////////////////////////////////////
-
-inSearchLoop::inSearchLoop(inISearchProcess* aSearchProcess)
-{
-  mSearchProcess = aSearchProcess;
-  nsresult rv;
-  mTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
-}
-
-inSearchLoop::~inSearchLoop()
-{
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// inSearchLoop
-
-nsresult
-inSearchLoop::Start()
-{
-  mTimer->InitWithFuncCallback(inSearchLoop::TimerCallback, (void*)this, 0, nsITimer::TYPE_REPEATING_SLACK);
-
-  return NS_OK;
-}
-
-nsresult
-inSearchLoop::Step()
-{
-  bool done = false;
-  mSearchProcess->SearchStep(&done);
-
-  if (done)
-    Stop();
-
-  return NS_OK;
-}
-
-nsresult
-inSearchLoop::Stop()
-{
-  mTimer->Cancel();
-  
-  return NS_OK;
-}
-
-void 
-inSearchLoop::TimerCallback(nsITimer *aTimer, void *aClosure)
-{
-  inSearchLoop* loop = (inSearchLoop*) aClosure;
-  loop->Step();
-}
deleted file mode 100644
--- a/layout/inspector/inSearchLoop.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef __inSearchLoop_h__
-#define __inSearchLoop_h__
-
-#include "nsCOMPtr.h"
-#include "nsITimer.h"
-#include "inISearchProcess.h"
-
-class inSearchLoop
-{
-public:
-  explicit inSearchLoop(inISearchProcess* aSearchProcess);
-  virtual ~inSearchLoop();
-
-  nsresult Start();
-  nsresult Step();
-  nsresult Stop();
-  static void TimerCallback(nsITimer *aTimer, void *aClosure);
-
-protected:
-  nsCOMPtr<nsITimer> mTimer;
-  nsCOMPtr<inISearchProcess> mSearchProcess;
-};
-
-#endif
--- a/layout/inspector/moz.build
+++ b/layout/inspector/moz.build
@@ -26,17 +26,16 @@ EXPORTS += [
     'nsFontFaceList.h',
 ]
 
 UNIFIED_SOURCES += [
     'inCSSValueSearch.cpp',
     'inDeepTreeWalker.cpp',
     'inDOMUtils.cpp',
     'inLayoutUtils.cpp',
-    'inSearchLoop.cpp',
     'nsFontFace.cpp',
     'nsFontFaceList.cpp',
 ]
 
 if CONFIG['MOZ_XUL']:
     UNIFIED_SOURCES += [
         'inDOMView.cpp',
     ]