WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
Bug 239643
Add a smart pointer to hold JSValueProtect() objects
https://bugs.webkit.org/show_bug.cgi?id=239643
Summary
Add a smart pointer to hold JSValueProtect() objects
Kimmo Kinnunen
Reported
2022-04-22 01:50:35 PDT
Add a smart pointer to hold JSValueProtect() objects From
bug 239495
Attachments
Add attachment
proposed patch, testcase, etc.
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
<
rdar://problem/92513529
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug