Bug 1528296 - remove unused viewer-helpers; r=vporof
authoryulia <ystartsev@mozilla.com>
Wed, 13 Mar 2019 16:52:03 +0000
changeset 524741 b7cc6eee1f24aa0deeb768a74d14256ba403b5fa
parent 524740 a458270028849ce78b842cfcd613ddbda62a1529
child 524742 f87bb852e0742b86cf2686bf82921f6d57ab073f
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvporof
bugs1528296
milestone67.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 1528296 - remove unused viewer-helpers; r=vporof Differential Revision: https://phabricator.services.mozilla.com/D22496
devtools/client/shared/widgets/view-helpers.js
--- a/devtools/client/shared/widgets/view-helpers.js
+++ b/devtools/client/shared/widgets/view-helpers.js
@@ -43,55 +43,16 @@ const clearNamedTimeout = function clear
     return;
   }
   clearTimeout(namedTimeoutsStore.get(id));
   namedTimeoutsStore.delete(id);
 };
 exports.clearNamedTimeout = clearNamedTimeout;
 
 /**
- * Same as `setNamedTimeout`, but invokes the callback only if the provided
- * predicate function returns true. Otherwise, the timeout is re-triggered.
- *
- * @param string id
- *        A string identifier for the conditional timeout.
- * @param number wait
- *        The amount of milliseconds to wait after no more events are fired.
- * @param function predicate
- *        The predicate function used to determine whether the timeout restarts.
- * @param function callback
- *        Invoked when no more events are fired after the specified time, and
- *        the provided predicate function returns true.
- */
-const setConditionalTimeout = function setConditionalTimeout(id, wait,
-                                                             predicate,
-                                                             callback) {
-  setNamedTimeout(id, wait, function maybeCallback() {
-    if (predicate()) {
-      callback();
-      return;
-    }
-    setConditionalTimeout(id, wait, predicate, callback);
-  });
-};
-exports.setConditionalTimeout = setConditionalTimeout;
-
-/**
- * Clears a conditional timeout.
- * @see setConditionalTimeout
- *
- * @param string id
- *        A string identifier for the conditional timeout.
- */
-const clearConditionalTimeout = function clearConditionalTimeout(id) {
-  clearNamedTimeout(id);
-};
-exports.clearConditionalTimeout = clearConditionalTimeout;
-
-/**
  * Helpers for creating and messaging between UI components.
  */
 exports.ViewHelpers = {
   /**
    * Convenience method, dispatching a custom event.
    *
    * @param Node target
    *        A custom target element to dispatch the event from.