<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>260478</bug_id>
          
          <creation_ts>2023-08-21 12:26:49 -0700</creation_ts>
          <short_desc>[WPE][GTK] Enable requestIdleCallback</short_desc>
          <delta_ts>2025-10-06 14:12:57 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=164193</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>300022</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>rniwa</cc>
    
    <cc>ryan</cc>
    
    <cc>woodlxf00</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1972453</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-08-21 12:26:49 -0700</bug_when>
    <thetext>We need to enable requestIdleCallback, as in bug #260369. Ryosuke has left us this hint:

&quot;&quot;&quot;
You need to implement these functions: RunLoopObserver::schedule, RunLoopObserver::invalidate, and RunLoopObserver::isScheduled():

https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/RunLoopObserver.cpp
&quot;&quot;&quot;

Unfortunately, looking at RunLoopObserverCF, I can&apos;t think of any way to map this to GMainContext, so it&apos;s probably not possible. We shouldn&apos;t try to modify GMainContext unless there are no other options. This requires further investigation.

--------------------------------------------

We should also think about the problem I describe here: https://bugs.webkit.org/show_bug.cgi?id=164193#c18, i.e. we need to make sure web content cannot perform a denial of service that would prevent WebKit from running WebKit&apos;s own callbacks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1972482</commentid>
    <comment_count>1</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2023-08-21 14:01:22 -0700</bug_when>
    <thetext>FWIW, the feature may work out of box right now because of the code I added to WindowEventLoop:
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/dom/WindowEventLoop.cpp#L189

Might be worth testing to see if you can enable the feature anyway without implementing RunLoopObserver.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2148839</commentid>
    <comment_count>2</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2025-10-06 14:12:57 -0700</bug_when>
    <thetext>We got an implementation of RunLoopObserver now - currently under review @ https://github.com/WebKit/WebKit/pull/51678.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>