Bug 237126

Summary: [MacCatalyst] REGRESSION(r290091): sometimes can crash if `WKWebView` is deallocated before the next visible content rect update
Product: WebKit Reporter: Devin Rousso <hi>
Component: New BugsAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: akeerthi, hi, katherine_cheney, megan_gardner, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 236745    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
[fast-cq] Patch ews-feeder: commit-queue-

Description Devin Rousso 2022-02-23 19:04:06 PST
.
Comment 1 Devin Rousso 2022-02-23 19:05:05 PST
<rdar://problem/89345853>
Comment 2 Devin Rousso 2022-02-23 19:06:22 PST
Created attachment 453065 [details]
Patch
Comment 3 Tim Horton 2022-02-23 19:08:49 PST
Comment on attachment 453065 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453065&action=review

> Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewResize.mm:44
> +        if ([exception.name hasPrefix:@"Assertion deallocated before it was invalidated."])

Any exception during dealloc would be bad, not sure why you’re being so specific (and making the test extremely susceptible to false positives if the string changes)
Comment 4 Devin Rousso 2022-02-23 20:02:22 PST
Comment on attachment 453065 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453065&action=review

>> Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewResize.mm:44
>> +        if ([exception.name hasPrefix:@"Assertion deallocated before it was invalidated."])
> 
> Any exception during dealloc would be bad, not sure why you’re being so specific (and making the test extremely susceptible to false positives if the string changes)

Good point.  Not really sure why I'm being so specific.  I'll remove the `hasPrefix:` and unconditionally `didThrow = true` instead..
Comment 5 Devin Rousso 2022-02-24 08:55:48 PST
Created attachment 453104 [details]
[fast-cq] Patch
Comment 6 Wenson Hsieh 2022-02-24 10:20:48 PST
*** Bug 237145 has been marked as a duplicate of this bug. ***
Comment 7 EWS 2022-02-24 10:31:11 PST
Committed r290442 (247745@main): <https://commits.webkit.org/247745@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453104 [details].