Bug 239643

Summary: Add a smart pointer to hold JSValueProtect() objects
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=239495

Kimmo Kinnunen
Reported 2022-04-22 01:50:35 PDT
Add a smart pointer to hold JSValueProtect() objects From bug 239495
Attachments
Kimmo Kinnunen
Comment 1 2022-04-22 01:51:49 PDT
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); }); } }
Radar WebKit Bug Importer
Comment 2 2022-04-29 01:51:13 PDT
Note You need to log in before you can comment on or make changes to this bug.