moebius#73: DOM - window.requestIdleCallback - improvements (basic)

https://github.com/MoonchildProductions/moebius/pull/73
This commit is contained in:
janekptacijarabaci 2018-04-18 15:15:49 +02:00 • committed by Roy Tam
commit da2320b2ef
11 changed files with 558 additions and 200 deletions

View file

@ -41,7 +41,11 @@ public:
// default main thread being used.
nsresult InitTimer(nsIEventTarget* aTarget, uint32_t aDelay);
enum class Reason { eTimeoutOrInterval, eIdleCallbackTimeout };
enum class Reason
{
eTimeoutOrInterval,
eIdleCallbackTimeout,
};
#ifdef DEBUG
bool HasRefCntOne() const;
@ -62,6 +66,8 @@ public:
// True if this is a repeating/interval timer
bool mIsInterval;
// Used to allow several reasons for setting a timeout, where each
// 'Reason' value is using a possibly overlapping set of id:s.
Reason mReason;
// Returned as value of setTimeout()