[Webkit-unassigned] [Bug 239643] Add a smart pointer to hold JSValueProtect() objects
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Apr 22 01:51:49 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=239643
--- Comment #1 from Kimmo Kinnunen <kkinnunen at apple.com> ---
Bugs like
void setWheelEventMonitorTestCallbackAndStartMonitoring(bool expectWheelEndOrCancel, bool expectMomentumEnd, WebCore::Frame& frame, JSContextRef context, JSObjectRef jsCallbackFunction)
{
Page* page = frame.page();
if (!page || !page->isMonitoringWheelEvents())
return;
JSValueProtect(context, jsCallbackFunction);
if (auto wheelEventTestMonitor = page->wheelEventTestMonitor()) {
wheelEventTestMonitor->setTestCallbackAndStartMonitoring(expectWheelEndOrCancel, expectMomentumEnd, [=](void) {
JSObjectCallAsFunction(context, jsCallbackFunction, nullptr, 0, nullptr, nullptr);
JSValueUnprotect(context, jsCallbackFunction);
});
}
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220422/48852d5d/attachment.htm>
More information about the webkit-unassigned
mailing list