Bug 249057

Summary: Fix use-after-move in WebCore::RealtimeMediaSource::supportsSizeAndFrameRate()
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: MediaAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 210932    
Bug Blocks:    

Description David Kilzer (:ddkilzer) 2022-12-09 17:40:33 PST
Fix use-after-move in WebCore::RealtimeMediaSource::supportsSizeAndFrameRate().

Both `width` and `height` have a use-after-move bug in Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp:

```
    if (!supportsSizeAndFrameRate(WTFMove(width), WTFMove(height), WTFMove(frameRate))) {
        // Let's try without frame rate constraint if not mandatory.
        if (frameRateConstraint && !frameRateConstraint->isMandatory() && supportsSizeAndFrameRate(WTFMove(width), WTFMove(height), { }))
```
Comment 1 Radar WebKit Bug Importer 2022-12-09 17:40:47 PST
<rdar://problem/103201164>
Comment 2 David Kilzer (:ddkilzer) 2022-12-09 17:42:31 PST
Pull request: https://github.com/WebKit/WebKit/pull/7424
Comment 3 EWS 2022-12-10 13:37:51 PST
Committed 257685@main (c8239ff245f1): <https://commits.webkit.org/257685@main>

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