Skip to content

REGRESSION(296514@main): Triggering assertions in debug iOS tests #47130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

pvollan
Copy link
Contributor

@pvollan pvollan commented Jun 24, 2025

5c3ce74

REGRESSION(296514@main): Triggering assertions in debug iOS tests
https://bugs.webkit.org/show_bug.cgi?id=294916
rdar://154213939

Reviewed by Sihui Liu.

After 296514@main, we need to be sending a MachSendRightAnnotated object instead of a MachSendRight
when updating bounds and position of a RemoteSampleBufferDisplayLayer.

* Source/WebCore/platform/graphics/avfoundation/SampleBufferDisplayLayer.h:
* Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h:
* Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:
(WebCore::LocalSampleBufferDisplayLayer::updateBoundsAndPosition):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoLayerSizeFenced):
* Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::updateSampleBufferDisplayLayerBoundsAndPosition):
* Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h:
* Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in:
* Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h:
* Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.mm:
(WebKit::RemoteSampleBufferDisplayLayer::updateBoundsAndPosition):
* Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp:
(WebKit::RemoteSampleBufferDisplayLayerManager::updateSampleBufferDisplayLayerBoundsAndPosition):
* Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h:
* Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:
(WebKit::SampleBufferDisplayLayer::updateBoundsAndPosition):
* Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:

Canonical link: https://commits.webkit.org/296603@main

4a783bf

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ❌ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 🧪 unsafe-merge ✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@pvollan pvollan requested a review from cdumez as a code owner June 24, 2025 19:10
@pvollan pvollan self-assigned this Jun 24, 2025
@pvollan pvollan added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Jun 24, 2025
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 24, 2025
@pvollan pvollan removed the merging-blocked Applied to prevent a change from being merged label Jun 24, 2025
@pvollan pvollan force-pushed the eng/REGRESSION-296514-main-Triggering-assertions-in-debug-iOS-tests branch from a5b4c53 to 0d2cf20 Compare June 24, 2025 20:39
@pvollan pvollan force-pushed the eng/REGRESSION-296514-main-Triggering-assertions-in-debug-iOS-tests branch from 0d2cf20 to 9ac3062 Compare June 24, 2025 20:52
@pvollan pvollan force-pushed the eng/REGRESSION-296514-main-Triggering-assertions-in-debug-iOS-tests branch from 9ac3062 to 9761851 Compare June 24, 2025 21:28
[hostingUpdateCoordinator addLayerHierarchy:m_layerHostingContext->hostable().get()];
}
protectedSampleBufferDisplayLayer()->updateBoundsAndPosition(bounds, { });
[hostingUpdateCoordinator commit];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hostingUpdateCoordinator may be nil. Is it okay? Sending message to nil is acceptable but smelling bad behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point! I added checks and an error message.

Thanks for reviewing!

@pvollan pvollan force-pushed the eng/REGRESSION-296514-main-Triggering-assertions-in-debug-iOS-tests branch from 9761851 to 4a783bf Compare June 24, 2025 23:44
@pvollan pvollan requested review from basuke and szewai June 24, 2025 23:45
@@ -110,12 +110,30 @@
protectedSampleBufferDisplayLayer()->updateDisplayMode(hideDisplayLayer, hideRootLayer);
}

void RemoteSampleBufferDisplayLayer::updateBoundsAndPosition(CGRect bounds, std::optional<WTF::MachSendRight>&& fence)
void RemoteSampleBufferDisplayLayer::updateBoundsAndPosition(CGRect bounds, std::optional<WTF::MachSendRightAnnotated>&& fence)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@youennf I am going to r+ since the fix is needed for bot to run; you might want to take a look when you have time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing!

@pvollan pvollan requested a review from youennf June 25, 2025 01:29
@pvollan pvollan added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 25, 2025
https://bugs.webkit.org/show_bug.cgi?id=294916
rdar://154213939

Reviewed by Sihui Liu.

After 296514@main, we need to be sending a MachSendRightAnnotated object instead of a MachSendRight
when updating bounds and position of a RemoteSampleBufferDisplayLayer.

* Source/WebCore/platform/graphics/avfoundation/SampleBufferDisplayLayer.h:
* Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h:
* Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:
(WebCore::LocalSampleBufferDisplayLayer::updateBoundsAndPosition):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoLayerSizeFenced):
* Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::updateSampleBufferDisplayLayerBoundsAndPosition):
* Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h:
* Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in:
* Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h:
* Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.mm:
(WebKit::RemoteSampleBufferDisplayLayer::updateBoundsAndPosition):
* Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp:
(WebKit::RemoteSampleBufferDisplayLayerManager::updateSampleBufferDisplayLayerBoundsAndPosition):
* Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h:
* Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:
(WebKit::SampleBufferDisplayLayer::updateBoundsAndPosition):
* Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:

Canonical link: https://commits.webkit.org/296603@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/REGRESSION-296514-main-Triggering-assertions-in-debug-iOS-tests branch from 4a783bf to 5c3ce74 Compare June 25, 2025 04:16
@webkit-commit-queue
Copy link
Collaborator

Committed 296603@main (5c3ce74): https://commits.webkit.org/296603@main

Reviewed commits have been landed. Closing PR #47130 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 5c3ce74 into WebKit:main Jun 25, 2025
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Bugs Unclassified bugs are placed in this component until the correct component can be determined.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants