DevTools: introduce WebInspector.Throttler
This patch introduces WebInspector.Throttler and uses it for throttling calls to PageAgent in OverridesSupport, as well as throttling calls in StylesSourceMapping. Throttler is a helper object that throttles execution of processes (possibly asynchronous). Throttler is created with a single parameter - throttle interval T. Throttler satisfies to the following contract: for every two consecutive runs performed by throttler, time between the end of the first run and start of the second run is always greater or equal to T. Throttler.schedule has additional second parameter "asSoonAsPossible" which essentially sets throttler timeout into 0 for the next process run. Review URL: https://codereview.chromium.org/319143002 git-svn-id: svn://svn.chromium.org/blink/trunk@175956 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment