Bug 1528296 - remove unused viewer-helpers; r=vporof
☠☠ backed out by 75b49fcc2743 ☠ ☠
authoryulia <ystartsev@mozilla.com>
Tue, 12 Mar 2019 15:00:27 +0000
changeset 521541 cebff9f6f811
parent 521540 78be67cfabe8
child 521542 47fff0f9b424
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [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.