Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 39ee5e3e49f12d88a290b4d6326d1387f27122e3 https://github.com/WebKit/WebKit/commit/39ee5e3e49f12d88a290b4d6326d1387f27122e3 Author: Ryan Reno <rr...@apple.com> Date: 2024-07-02 (Tue, 02 Jul 2024)
Changed paths: M Source/WebCore/Modules/entriesapi/ErrorCallback.idl M Source/WebCore/Modules/entriesapi/FileCallback.idl M Source/WebCore/Modules/entriesapi/FileSystemEntriesCallback.idl M Source/WebCore/Modules/entriesapi/FileSystemEntryCallback.idl M Source/WebCore/Modules/geolocation/PositionCallback.idl M Source/WebCore/Modules/geolocation/PositionErrorCallback.idl M Source/WebCore/Modules/mediasession/MediaSessionActionHandler.idl M Source/WebCore/Modules/notifications/NotificationPermissionCallback.idl M Source/WebCore/Modules/remoteplayback/RemotePlaybackAvailabilityCallback.idl M Source/WebCore/Modules/reporting/ReportingObserverCallback.idl M Source/WebCore/Modules/web-locks/WebLockGrantedCallback.idl M Source/WebCore/Modules/webaudio/AudioBufferCallback.idl M Source/WebCore/Modules/webaudio/AudioWorkletProcessorConstructor.idl M Source/WebCore/Modules/webcodecs/WebCodecsAudioDataOutputCallback.idl M Source/WebCore/Modules/webcodecs/WebCodecsEncodedAudioChunkOutputCallback.idl M Source/WebCore/Modules/webcodecs/WebCodecsEncodedVideoChunkOutputCallback.idl M Source/WebCore/Modules/webcodecs/WebCodecsErrorCallback.idl M Source/WebCore/Modules/webcodecs/WebCodecsVideoFrameOutputCallback.idl M Source/WebCore/Modules/webdatabase/DatabaseCallback.idl M Source/WebCore/Modules/webdatabase/SQLStatementCallback.idl M Source/WebCore/Modules/webdatabase/SQLStatementErrorCallback.idl M Source/WebCore/Modules/webdatabase/SQLTransactionCallback.idl M Source/WebCore/Modules/webdatabase/SQLTransactionErrorCallback.idl M Source/WebCore/Modules/webxr/XRFrameRequestCallback.idl M Source/WebCore/animation/CustomEffectCallback.idl M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm M Source/WebCore/bindings/scripts/IDLAttributes.json M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.h A Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionStrong.cpp A Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionStrong.h M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithVariadic.cpp M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithVariadic.h M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.h M Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp M Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.h M Source/WebCore/bindings/scripts/test/SupplementalDependencies.dep A Source/WebCore/bindings/scripts/test/TestCallbackFunctionStrong.idl M Source/WebCore/css/CSSPaintCallback.idl M Source/WebCore/dom/AbortAlgorithm.idl M Source/WebCore/dom/CreateHTMLCallback.idl M Source/WebCore/dom/CreateScriptCallback.idl M Source/WebCore/dom/CreateScriptURLCallback.idl M Source/WebCore/dom/IdleRequestCallback.idl M Source/WebCore/dom/MutationCallback.idl M Source/WebCore/dom/NodeFilter.idl M Source/WebCore/dom/RequestAnimationFrameCallback.idl M Source/WebCore/dom/StringCallback.idl M Source/WebCore/dom/ViewTransitionUpdateCallback.idl M Source/WebCore/fileapi/BlobCallback.idl M Source/WebCore/html/VideoFrameRequestCallback.idl M Source/WebCore/html/VoidCallback.idl M Source/WebCore/inspector/RTCLogsCallback.idl M Source/WebCore/page/IntersectionObserverCallback.idl M Source/WebCore/page/NavigationInterceptHandler.idl M Source/WebCore/page/PerformanceObserverCallback.idl M Source/WebCore/page/ResizeObserverCallback.idl M Source/WebCore/testing/XRSimulateUserActivationFunction.idl M Source/WebCore/xml/CustomXPathNSResolver.idl A filenames Log Message: ----------- Make IsWeakCallback the default https://bugs.webkit.org/show_bug.cgi?id=256269 rdar://108859209 Reviewed by Ryosuke Niwa. Callbacks are held as Strong handles which make them GC roots by default. This can cause these functions to leak objects they capture. In order to opt-out of this behavior and manage their lifetime manually the extended IDL attribute `IsWeakCallback` was created. There have been at least two memory leaks fixed by switching callbacks from Strong to Weak (263868@main and 280557@main). In order to help prevent these leaks in the future this patch swaps the defualt by replacing `IsWeakCallback` with `IsStrongCallback`. For now we leave all the callbacks which were previously strong as such. * Source/WebCore/Modules/entriesapi/ErrorCallback.idl: * Source/WebCore/Modules/entriesapi/FileCallback.idl: * Source/WebCore/Modules/entriesapi/FileSystemEntriesCallback.idl: * Source/WebCore/Modules/entriesapi/FileSystemEntryCallback.idl: * Source/WebCore/Modules/geolocation/PositionCallback.idl: * Source/WebCore/Modules/geolocation/PositionErrorCallback.idl: * Source/WebCore/Modules/mediasession/MediaSessionActionHandler.idl: * Source/WebCore/Modules/notifications/NotificationPermissionCallback.idl: * Source/WebCore/Modules/remoteplayback/RemotePlaybackAvailabilityCallback.idl: * Source/WebCore/Modules/reporting/ReportingObserverCallback.idl: * Source/WebCore/Modules/web-locks/WebLockGrantedCallback.idl: * Source/WebCore/Modules/webaudio/AudioBufferCallback.idl: * Source/WebCore/Modules/webaudio/AudioWorkletProcessorConstructor.idl: * Source/WebCore/Modules/webcodecs/WebCodecsAudioDataOutputCallback.idl: * Source/WebCore/Modules/webcodecs/WebCodecsEncodedAudioChunkOutputCallback.idl: * Source/WebCore/Modules/webcodecs/WebCodecsEncodedVideoChunkOutputCallback.idl: * Source/WebCore/Modules/webcodecs/WebCodecsErrorCallback.idl: * Source/WebCore/Modules/webcodecs/WebCodecsVideoFrameOutputCallback.idl: * Source/WebCore/Modules/webdatabase/DatabaseCallback.idl: * Source/WebCore/Modules/webdatabase/SQLStatementCallback.idl: * Source/WebCore/Modules/webdatabase/SQLStatementErrorCallback.idl: * Source/WebCore/Modules/webdatabase/SQLTransactionCallback.idl: * Source/WebCore/Modules/webdatabase/SQLTransactionErrorCallback.idl: * Source/WebCore/Modules/webxr/XRFrameRequestCallback.idl: * Source/WebCore/animation/CustomEffectCallback.idl: * Source/WebCore/bindings/scripts/CodeGeneratorJS.pm: (GenerateCallbackHeaderContent): (GenerateCallbackImplementationContent): * Source/WebCore/bindings/scripts/IDLAttributes.json: * Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp: (WebCore::JSTestCallbackFunction::JSTestCallbackFunction): (WebCore::JSTestCallbackFunction::visitJSFunction): * Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h: * Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp: (WebCore::JSTestCallbackFunctionRethrow::JSTestCallbackFunctionRethrow): (WebCore::JSTestCallbackFunctionRethrow::visitJSFunction): * Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.h: * Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionStrong.cpp: Copied from Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp. (WebCore::JSTestCallbackFunctionStrong::JSTestCallbackFunctionStrong): (WebCore::JSTestCallbackFunctionStrong::~JSTestCallbackFunctionStrong): (WebCore::JSTestCallbackFunctionStrong::handleEvent): (WebCore::toJS): * Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionStrong.h: Copied from Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h. (WebCore::toJS): * Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp: (WebCore::JSTestCallbackFunctionWithThisObject::JSTestCallbackFunctionWithThisObject): (WebCore::JSTestCallbackFunctionWithThisObject::visitJSFunction): * Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h: * Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp: (WebCore::JSTestCallbackFunctionWithTypedefs::JSTestCallbackFunctionWithTypedefs): (WebCore::JSTestCallbackFunctionWithTypedefs::visitJSFunction): * Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h: * Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithVariadic.cpp: (WebCore::JSTestCallbackFunctionWithVariadic::JSTestCallbackFunctionWithVariadic): (WebCore::JSTestCallbackFunctionWithVariadic::visitJSFunction): * Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithVariadic.h: * Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp: (WebCore::JSTestCallbackInterface::JSTestCallbackInterface): (WebCore::JSTestCallbackInterface::visitJSFunction): * Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.h: * Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp: (WebCore::JSTestVoidCallbackFunction::JSTestVoidCallbackFunction): (WebCore::JSTestVoidCallbackFunction::visitJSFunction): * Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.h: * Source/WebCore/bindings/scripts/test/SupplementalDependencies.dep: * Source/WebCore/bindings/scripts/test/TestCallbackFunctionStrong.idl: Copied from Source/WebCore/html/VoidCallback.idl. * Source/WebCore/css/CSSPaintCallback.idl: * Source/WebCore/dom/AbortAlgorithm.idl: * Source/WebCore/dom/CreateHTMLCallback.idl: * Source/WebCore/dom/CreateScriptCallback.idl: * Source/WebCore/dom/CreateScriptURLCallback.idl: * Source/WebCore/dom/IdleRequestCallback.idl: * Source/WebCore/dom/MutationCallback.idl: * Source/WebCore/dom/NodeFilter.idl: * Source/WebCore/dom/RequestAnimationFrameCallback.idl: * Source/WebCore/dom/StringCallback.idl: * Source/WebCore/dom/ViewTransitionUpdateCallback.idl: * Source/WebCore/fileapi/BlobCallback.idl: * Source/WebCore/html/VideoFrameRequestCallback.idl: * Source/WebCore/html/VoidCallback.idl: * Source/WebCore/inspector/RTCLogsCallback.idl: * Source/WebCore/page/IntersectionObserverCallback.idl: * Source/WebCore/page/NavigationInterceptHandler.idl: * Source/WebCore/page/PerformanceObserverCallback.idl: * Source/WebCore/page/ResizeObserverCallback.idl: * Source/WebCore/testing/XRSimulateUserActivationFunction.idl: * Source/WebCore/xml/CustomXPathNSResolver.idl: Canonical link: https://commits.webkit.org/280611@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes