| Index: lib/compat.js |
| =================================================================== |
| --- a/lib/compat.js |
| +++ b/lib/compat.js |
| @@ -81,45 +81,41 @@ |
| obs: { |
| addObserver() {}, |
| removeObserver() {} |
| } |
| } |
| ] |
| ]); |
| -function FakeTimer() |
| +class FakeTimer |
| { |
| -} |
| -FakeTimer.prototype = |
| -{ |
| - delay: 0, |
|
Manish Jethani
2018/03/15 07:54:10
These are being assigned in the constructor (alway
|
| - callback: null, |
| initWithCallback(callback, delay) |
| { |
| this.callback = callback; |
| this.delay = delay; |
| this.scheduleTimeout(); |
| - }, |
| + } |
| + |
| scheduleTimeout() |
| { |
| window.setTimeout(() => |
| { |
| try |
| { |
| this.callback(); |
| } |
| catch (e) |
| { |
| Cu.reportError(e); |
| } |
| this.scheduleTimeout(); |
| }, this.delay); |
| } |
| -}; |
| +} |
| // |
| // Add a channel property to XMLHttpRequest, Synchronizer needs it |
| // |
| XMLHttpRequest.prototype.channel = { |
| status: -1, |
| loadFlags: 0, |