Bug 249452 - REGRESSION(257681@main) [WebDriver] Invalid WebPageProxy references after RefPtr moved into callbacks
Summary: REGRESSION(257681@main) [WebDriver] Invalid WebPageProxy references after Ref...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Lauro Moura
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-15 23:05 PST by Lauro Moura
Modified: 2022-12-16 07:43 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura 2022-12-15 23:05:26 PST
257681@main replaced plain WebPageProxy pointers with RefPtr, but IIUC, it also WTFMove'd some of these RefPtr into lambda captures while they were still used outside leading to invalid references. For example, being passed into a WebProcessProxy& parameter in the exitFullscreenWindowForPage() call inside setWindowFrameOfBrowsingContext() in [1]. When exit... executed, the page parameter received was (nil) after being moved.

As this happened in some WebAutomationSession methods used during the setup of many tests, the failures in the webdriver suite increased from ~23 to ~2008.

First build with failure: https://build.webkit.org/#/builders/37/builds/13372

Patch incoming.

[1] https://github.com/WebKit/WebKit/blob/main/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp#L417
Comment 1 Lauro Moura 2022-12-15 23:43:01 PST
Pull request: https://github.com/WebKit/WebKit/pull/7737
Comment 2 EWS 2022-12-16 07:42:49 PST
Committed 257988@main (7301504e0c22): <https://commits.webkit.org/257988@main>

Reviewed commits have been landed. Closing PR #7737 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-12-16 07:43:17 PST
<rdar://problem/103447051>