* Executes the wrapped function. * @param {?IdleDeadline} idleDeadline * @throws {Error} * @protected
(idleDeadline)
| 182 | * @protected |
| 183 | */ |
| 184 | runTask_(idleDeadline) { |
| 185 | if (this.state == TaskState_Enum.RUN) { |
| 186 | return; |
| 187 | } |
| 188 | this.state = TaskState_Enum.RUN; |
| 189 | try { |
| 190 | this.fn_(idleDeadline); |
| 191 | } catch (e) { |
| 192 | this.onTaskError_(e); |
| 193 | throw e; |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | /** |
| 198 | * @return {string} |