From 1edd30b1055db71a03e2305eeb4b8959c9704ef2 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 14 Feb 2024 13:34:18 +0100 Subject: [PATCH] Revert timers --- source | 49 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/source b/source index 2055f9789c2..e791838a428 100644 --- a/source +++ b/source @@ -109944,12 +109944,6 @@ interface mixin WindowEventHandlers { DOMString btoa(DOMString data); ByteString atob(DOMString data); - // timers - long setTimeout(TimerHandler handler, optional long timeout = 0, any... arguments); - undefined clearTimeout(optional long id = 0); - long setInterval(TimerHandler handler, optional long timeout = 0, any... arguments); - undefined clearInterval(optional long id = 0); - // microtask queuing undefined queueMicrotask(VoidFunction callback); @@ -110038,6 +110032,12 @@ interface mixin WindowOrWorkerGlobalScope { undefined reportError(any e); + // timers + long setTimeout(TimerHandler handler, optional long timeout = 0, any... arguments); + undefined clearTimeout(optional long id = 0); + long setInterval(TimerHandler handler, optional long timeout = 0, any... arguments); + undefined clearInterval(optional long id = 0); + // ImageBitmap Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options = {}); Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options = {}); @@ -110803,10 +110803,9 @@ partial interface ShadowRoot {
-

Objects that implement the WindowOrWorkerOrShadowRealmGlobalScope mixin have a - map of active timers, which is a - map, initially empty. - Each key in this map is an identifier for a timer, +

Objects that implement the WindowOrWorkerGlobalScope mixin have a map of active timers, which is a map, + initially empty. Each key in this map is an identifier for a timer, and each value is a DOMHighResTimeStamp, representing the expiry time for that timer.

@@ -110822,21 +110821,21 @@ partial interface ShadowRoot {
-

The The setTimeout(handler, timeout, ...arguments) method steps are to return the result of running the timer initialization steps given this, handler, timeout, arguments, and false.

-

The The setInterval(handler, timeout, ...arguments) method steps are to return the result of running the timer initialization steps given this, handler, timeout, arguments, and true.

-

The The clearTimeout(id) and clearInterval(id) method steps are to remove this's map of active timers[id].

@@ -110849,16 +110848,15 @@ partial interface ShadowRoot {

The timer initialization steps, given a - WindowOrWorkerOrShadowRealmGlobalScope global, a string or WindowOrWorkerGlobalScope global, a string or Function handler, a number timeout, a list arguments, a boolean repeat, and optionally (and only if repeat is true) a number previousId, are:

    -
  1. Let thisArg be global.

  2. - -
  3. If global is a Window object, then set thisArg to the - WindowProxy that corresponds to global.

  4. +
  5. Let thisArg be global if that is a WorkerGlobalScope + object; otherwise let thisArg be the WindowProxy that corresponds to + global.

  6. If previousId was given, let id be previousId; otherwise, let id be an implementation-defined integer that is greater @@ -110913,8 +110911,8 @@ partial interface ShadowRoot { If this throws an exception, catch it, report the exception, and abort these steps.

  7. -
  8. Let settings object be realm's principal realm's - environment settings object.

  9. +
  10. Let settings object be global's relevant settings + object.

  11. Let fetch options be the default classic script fetch options.

  12. @@ -111044,10 +111042,9 @@ scheduleWork(); // queues a task to do lots of work
    -

    To run steps after a timeout, given - a WindowOrWorkerOrShadowRealmGlobalScope global, - a string orderingIdentifier, a number milliseconds, - a set of steps completionSteps, and an optional value timerKey:

    +

    To run steps after a timeout, given a WindowOrWorkerGlobalScope + global, a string orderingIdentifier, a number milliseconds, a + set of steps completionSteps, and an optional value timerKey:

    1. Assert: if timerKey is given, then the caller of this algorithm is @@ -111069,8 +111066,6 @@ scheduleWork(); // queues a task to do lots of work

      1. -

        Need to handle shadow realms here.

        -

        If global is a Window object, wait until global's associated Document has been fully active for a further milliseconds milliseconds (not necessarily