[webkit-changes] [WebKit/WebKit] 838fda: Update ScriptExecutionContext::forEachActiveDOMObj...
Chris Dumez
noreply at github.com
Thu May 2 12:13:25 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 838fda3a50a10849e651dba7342361c364fc364e
https://github.com/WebKit/WebKit/commit/838fda3a50a10849e651dba7342361c364fc364e
Author: Chris Dumez <cdumez at apple.com>
Date: 2024-05-02 (Thu, 02 May 2024)
Changed paths:
M Source/WebCore/Modules/WebGPU/GPUDevice.h
M Source/WebCore/Modules/applepay/ApplePaySession.h
M Source/WebCore/Modules/applepay/ApplePaySetupWebCore.h
M Source/WebCore/Modules/audiosession/DOMAudioSession.h
M Source/WebCore/Modules/cache/DOMCache.h
M Source/WebCore/Modules/cache/DOMCacheStorage.h
M Source/WebCore/Modules/cookie-store/CookieStore.h
M Source/WebCore/Modules/encryptedmedia/MediaKeySession.h
M Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.h
M Source/WebCore/Modules/encryptedmedia/MediaKeySystemRequest.h
M Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeySession.h
M Source/WebCore/Modules/entriesapi/FileSystemDirectoryReader.h
M Source/WebCore/Modules/entriesapi/FileSystemEntry.h
M Source/WebCore/Modules/fetch/FetchBodyOwner.h
M Source/WebCore/Modules/filesystemaccess/FileSystemHandle.h
M Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.h
M Source/WebCore/Modules/gamepad/GamepadHapticActuator.h
M Source/WebCore/Modules/geolocation/Geolocation.h
M Source/WebCore/Modules/indexeddb/IDBDatabase.h
M Source/WebCore/Modules/indexeddb/IDBDatabaseNameAndVersionRequest.h
M Source/WebCore/Modules/indexeddb/IDBIndex.cpp
M Source/WebCore/Modules/indexeddb/IDBIndex.h
M Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp
M Source/WebCore/Modules/indexeddb/IDBObjectStore.h
M Source/WebCore/Modules/indexeddb/IDBRequest.h
M Source/WebCore/Modules/indexeddb/IDBTransaction.h
M Source/WebCore/Modules/mediarecorder/MediaRecorder.h
M Source/WebCore/Modules/mediasession/MediaSession.h
M Source/WebCore/Modules/mediasession/MediaSessionCoordinator.h
M Source/WebCore/Modules/mediasource/MediaSource.h
M Source/WebCore/Modules/mediasource/SourceBuffer.h
M Source/WebCore/Modules/mediasource/SourceBufferList.h
M Source/WebCore/Modules/mediastream/ImageCapture.h
M Source/WebCore/Modules/mediastream/MediaDevices.h
M Source/WebCore/Modules/mediastream/MediaStream.h
M Source/WebCore/Modules/mediastream/MediaStreamTrack.h
M Source/WebCore/Modules/mediastream/RTCDTMFSender.h
M Source/WebCore/Modules/mediastream/RTCDataChannel.h
M Source/WebCore/Modules/mediastream/RTCDtlsTransport.h
M Source/WebCore/Modules/mediastream/RTCIceTransport.h
M Source/WebCore/Modules/mediastream/RTCPeerConnection.h
M Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.h
M Source/WebCore/Modules/mediastream/RTCRtpScriptTransform.h
M Source/WebCore/Modules/mediastream/RTCRtpScriptTransformer.h
M Source/WebCore/Modules/mediastream/RTCSctpTransport.h
M Source/WebCore/Modules/mediastream/UserMediaRequest.h
M Source/WebCore/Modules/model-element/HTMLModelElement.h
M Source/WebCore/Modules/notifications/Notification.h
M Source/WebCore/Modules/paymentrequest/PaymentRequest.h
M Source/WebCore/Modules/paymentrequest/PaymentResponse.h
M Source/WebCore/Modules/permissions/PermissionStatus.h
M Source/WebCore/Modules/pictureinpicture/PictureInPictureWindow.h
M Source/WebCore/Modules/remoteplayback/RemotePlayback.h
M Source/WebCore/Modules/screen-wake-lock/WakeLockSentinel.h
M Source/WebCore/Modules/speech/SpeechRecognition.h
M Source/WebCore/Modules/speech/SpeechSynthesis.h
M Source/WebCore/Modules/speech/SpeechSynthesisUtterance.h
M Source/WebCore/Modules/web-locks/WebLockManager.h
M Source/WebCore/Modules/webaudio/AudioDestinationNode.cpp
M Source/WebCore/Modules/webaudio/AudioDestinationNode.h
M Source/WebCore/Modules/webaudio/AudioNode.cpp
M Source/WebCore/Modules/webaudio/AudioNode.h
M Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.h
M Source/WebCore/Modules/webaudio/AudioWorkletNode.h
M Source/WebCore/Modules/webaudio/BaseAudioContext.cpp
M Source/WebCore/Modules/webaudio/BaseAudioContext.h
M Source/WebCore/Modules/webaudio/ScriptProcessorNode.h
M Source/WebCore/Modules/webcodecs/WebCodecsAudioDecoder.h
M Source/WebCore/Modules/webcodecs/WebCodecsAudioEncoder.h
M Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.h
M Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.h
M Source/WebCore/Modules/webdatabase/DatabaseContext.h
M Source/WebCore/Modules/websockets/WebSocket.h
M Source/WebCore/Modules/webtransport/WebTransport.h
M Source/WebCore/Modules/webxr/WebXRSession.h
M Source/WebCore/Modules/webxr/WebXRSystem.h
M Source/WebCore/animation/WebAnimation.h
M Source/WebCore/css/CSSFontFace.h
M Source/WebCore/css/CSSFontFaceSet.h
M Source/WebCore/css/CSSFontSelector.h
M Source/WebCore/css/CSSSegmentedFontFace.h
M Source/WebCore/css/FontFace.h
M Source/WebCore/css/FontFaceSet.h
M Source/WebCore/css/MediaQueryList.h
M Source/WebCore/dom/ActiveDOMObject.h
M Source/WebCore/dom/BroadcastChannel.h
M Source/WebCore/dom/MessagePort.h
M Source/WebCore/dom/ScriptExecutionContext.cpp
M Source/WebCore/dom/ScriptExecutionContext.h
M Source/WebCore/dom/ViewTransition.h
M Source/WebCore/fileapi/Blob.h
M Source/WebCore/fileapi/FileReader.h
M Source/WebCore/html/CanvasBase.h
M Source/WebCore/html/CustomPaintCanvas.h
M Source/WebCore/html/HTMLCanvasElement.h
M Source/WebCore/html/HTMLImageElement.h
M Source/WebCore/html/HTMLMarqueeElement.h
M Source/WebCore/html/HTMLMediaElement.h
M Source/WebCore/html/HTMLSourceElement.h
M Source/WebCore/html/HTMLTrackElement.h
M Source/WebCore/html/ImageBitmap.cpp
M Source/WebCore/html/OffscreenCanvas.h
M Source/WebCore/html/PublicURLManager.cpp
M Source/WebCore/html/PublicURLManager.h
M Source/WebCore/html/canvas/CanvasRenderingContext.cpp
M Source/WebCore/html/canvas/CanvasRenderingContext.h
M Source/WebCore/html/canvas/GPUBasedCanvasRenderingContext.h
M Source/WebCore/html/track/TextTrack.h
M Source/WebCore/html/track/TextTrackCue.h
M Source/WebCore/html/track/TrackListBase.h
M Source/WebCore/page/DOMTimer.h
M Source/WebCore/page/EventSource.h
M Source/WebCore/page/ScreenOrientation.h
M Source/WebCore/workers/Worker.h
M Source/WebCore/workers/WorkerAnimationController.h
M Source/WebCore/workers/service/ServiceWorker.h
M Source/WebCore/workers/service/ServiceWorkerContainer.cpp
M Source/WebCore/workers/service/ServiceWorkerContainer.h
M Source/WebCore/workers/service/ServiceWorkerRegistration.h
M Source/WebCore/workers/service/background-fetch/BackgroundFetchRegistration.h
M Source/WebCore/workers/shared/SharedWorker.h
M Source/WebCore/worklets/Worklet.h
M Source/WebCore/xml/XMLHttpRequest.h
M Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h
Log Message:
-----------
Update ScriptExecutionContext::forEachActiveDOMObject() to ref the ActiveDOMObjects
https://bugs.webkit.org/show_bug.cgi?id=273462
Reviewed by Ryosuke Niwa.
Update ScriptExecutionContext::forEachActiveDOMObject() to ref the ActiveDOMObjects,
to avoid bugs like Bug 273451.
Also fix an issue with AudioNode where the node could get deleted if ref'd after the
node has been marked for deletion. When an AudioNode's ref-count reaches 0, we mark it for
deletion, so that the BaseAudioContext will eventually destroy it. During this time, the
AudioNode is still registered as an ActiveDOMObject with the ScriptExecutionContext, which
may thus ref it. When a Node gets ref'd we now unmark it for deletion until its ref-count
reaches 0 again.
* Source/WebCore/Modules/WebGPU/GPUDevice.h:
* Source/WebCore/Modules/applepay/ApplePaySession.h:
* Source/WebCore/Modules/applepay/ApplePaySetupWebCore.h:
* Source/WebCore/Modules/audiosession/DOMAudioSession.h:
* Source/WebCore/Modules/cache/DOMCache.h:
* Source/WebCore/Modules/cache/DOMCacheStorage.h:
* Source/WebCore/Modules/cookie-store/CookieStore.h:
* Source/WebCore/Modules/encryptedmedia/MediaKeySession.h:
* Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.h:
* Source/WebCore/Modules/encryptedmedia/MediaKeySystemRequest.h:
* Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
* Source/WebCore/Modules/entriesapi/FileSystemDirectoryReader.h:
* Source/WebCore/Modules/entriesapi/FileSystemEntry.h:
* Source/WebCore/Modules/fetch/FetchBodyOwner.h:
* Source/WebCore/Modules/filesystemaccess/FileSystemHandle.h:
* Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.h:
* Source/WebCore/Modules/gamepad/GamepadHapticActuator.h:
* Source/WebCore/Modules/geolocation/Geolocation.h:
* Source/WebCore/Modules/indexeddb/IDBActiveDOMObject.h:
* Source/WebCore/Modules/indexeddb/IDBIndex.h:
* Source/WebCore/Modules/indexeddb/IDBObjectStore.h:
* Source/WebCore/Modules/mediarecorder/MediaRecorder.h:
* Source/WebCore/Modules/mediasession/MediaSession.h:
* Source/WebCore/Modules/mediasession/MediaSessionCoordinator.h:
* Source/WebCore/Modules/mediasource/MediaSource.h:
* Source/WebCore/Modules/mediasource/SourceBuffer.h:
* Source/WebCore/Modules/mediasource/SourceBufferList.h:
* Source/WebCore/Modules/mediastream/ImageCapture.h:
* Source/WebCore/Modules/mediastream/MediaDevices.h:
* Source/WebCore/Modules/mediastream/MediaStream.h:
* Source/WebCore/Modules/mediastream/MediaStreamTrack.h:
* Source/WebCore/Modules/mediastream/RTCDTMFSender.h:
* Source/WebCore/Modules/mediastream/RTCDataChannel.h:
* Source/WebCore/Modules/mediastream/RTCDtlsTransport.h:
* Source/WebCore/Modules/mediastream/RTCIceTransport.h:
* Source/WebCore/Modules/mediastream/RTCPeerConnection.h:
* Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.h:
* Source/WebCore/Modules/mediastream/RTCRtpScriptTransform.h:
* Source/WebCore/Modules/mediastream/RTCRtpScriptTransformer.h:
* Source/WebCore/Modules/mediastream/RTCSctpTransport.h:
* Source/WebCore/Modules/mediastream/UserMediaRequest.h:
* Source/WebCore/Modules/model-element/HTMLModelElement.h:
* Source/WebCore/Modules/notifications/Notification.h:
* Source/WebCore/Modules/paymentrequest/PaymentRequest.h:
* Source/WebCore/Modules/paymentrequest/PaymentResponse.h:
* Source/WebCore/Modules/permissions/PermissionStatus.h:
* Source/WebCore/Modules/pictureinpicture/PictureInPictureWindow.h:
* Source/WebCore/Modules/remoteplayback/RemotePlayback.h:
* Source/WebCore/Modules/screen-wake-lock/WakeLockSentinel.h:
* Source/WebCore/Modules/speech/SpeechRecognition.h:
* Source/WebCore/Modules/speech/SpeechSynthesis.h:
* Source/WebCore/Modules/speech/SpeechSynthesisUtterance.h:
* Source/WebCore/Modules/web-locks/WebLockManager.h:
* Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.h:
* Source/WebCore/Modules/webaudio/AudioWorkletNode.h:
* Source/WebCore/Modules/webaudio/BaseAudioContext.h:
* Source/WebCore/Modules/webaudio/ScriptProcessorNode.h:
* Source/WebCore/Modules/webcodecs/WebCodecsAudioDecoder.h:
* Source/WebCore/Modules/webcodecs/WebCodecsAudioEncoder.h:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.h:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.h:
* Source/WebCore/Modules/webdatabase/DatabaseContext.h:
* Source/WebCore/Modules/websockets/WebSocket.h:
* Source/WebCore/Modules/webtransport/WebTransport.h:
* Source/WebCore/Modules/webxr/WebXRSession.h:
* Source/WebCore/Modules/webxr/WebXRSystem.h:
* Source/WebCore/animation/WebAnimation.h:
* Source/WebCore/css/CSSFontSelector.h:
* Source/WebCore/css/FontFace.h:
* Source/WebCore/css/FontFaceSet.h:
* Source/WebCore/css/MediaQueryList.h:
* Source/WebCore/dom/ActiveDOMObject.h:
* Source/WebCore/dom/BroadcastChannel.h:
* Source/WebCore/dom/MessagePort.h:
* Source/WebCore/dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::forEachActiveDOMObject const):
* Source/WebCore/dom/ScriptExecutionContext.h:
* Source/WebCore/dom/ViewTransition.h:
* Source/WebCore/fileapi/Blob.h:
* Source/WebCore/fileapi/FileReader.h:
* Source/WebCore/html/CanvasBase.h:
(WebCore::CanvasBase::ref const):
(WebCore::CanvasBase::deref const):
(WebCore::CanvasBase::ref): Deleted.
(WebCore::CanvasBase::deref): Deleted.
* Source/WebCore/html/CustomPaintCanvas.h:
* Source/WebCore/html/HTMLCanvasElement.h:
* Source/WebCore/html/HTMLImageElement.h:
* Source/WebCore/html/HTMLMarqueeElement.h:
* Source/WebCore/html/HTMLMediaElement.h:
* Source/WebCore/html/HTMLSourceElement.h:
* Source/WebCore/html/HTMLTrackElement.h:
* Source/WebCore/html/ImageBitmap.cpp:
* Source/WebCore/html/OffscreenCanvas.h:
* Source/WebCore/html/PublicURLManager.cpp:
(WebCore::PublicURLManager::create):
* Source/WebCore/html/PublicURLManager.h:
* Source/WebCore/html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::ref const):
(WebCore::CanvasRenderingContext::deref const):
(WebCore::CanvasRenderingContext::ref): Deleted.
(WebCore::CanvasRenderingContext::deref): Deleted.
* Source/WebCore/html/canvas/CanvasRenderingContext.h:
* Source/WebCore/html/canvas/GPUBasedCanvasRenderingContext.h:
* Source/WebCore/html/track/TextTrack.h:
* Source/WebCore/html/track/TextTrackCue.h:
* Source/WebCore/html/track/TrackListBase.h:
* Source/WebCore/page/DOMTimer.h:
* Source/WebCore/page/EventSource.h:
* Source/WebCore/page/ScreenOrientation.h:
* Source/WebCore/workers/Worker.h:
* Source/WebCore/workers/WorkerAnimationController.h:
* Source/WebCore/workers/service/ServiceWorker.h:
* Source/WebCore/workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::refActiveDOMObject):
(WebCore::ServiceWorkerContainer::derefActiveDOMObject):
* Source/WebCore/workers/service/ServiceWorkerContainer.h:
* Source/WebCore/workers/service/ServiceWorkerRegistration.h:
* Source/WebCore/workers/service/background-fetch/BackgroundFetchRegistration.h:
* Source/WebCore/workers/shared/SharedWorker.h:
* Source/WebCore/worklets/Worklet.h:
* Source/WebCore/xml/XMLHttpRequest.h:
Canonical link: https://commits.webkit.org/278273@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list