Bug 260478

Summary: [WPE][GTK] Enable requestIdleCallback
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bugs-noreply, rniwa, ryan, woodlxf00, zimmermann
Priority: P2    
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
See Also: https://bugs.webkit.org/show_bug.cgi?id=164193
Bug Depends on: 300022    
Bug Blocks:    

Michael Catanzaro
Reported 2023-08-21 12:26:49 PDT
We need to enable requestIdleCallback, as in bug #260369. Ryosuke has left us this hint: """ 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 """ Unfortunately, looking at RunLoopObserverCF, I can't think of any way to map this to GMainContext, so it's probably not possible. We shouldn'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's own callbacks.
Attachments
Ryosuke Niwa
Comment 1 2023-08-21 14:01:22 PDT
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.
Nikolas Zimmermann
Comment 2 2025-10-06 14:12:57 PDT
We got an implementation of RunLoopObserver now - currently under review @ https://github.com/WebKit/WebKit/pull/51678.
Note You need to log in before you can comment on or make changes to this bug.