[webkit-changes] [WebKit/WebKit] 5a1b7b: Occasional debug assertion in '-[WKDOMRange _initW...
Richard Robinson
noreply at github.com
Wed Aug 21 11:15:01 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5a1b7be9c6cff0a691d886cdfd2179a5e10b7ad8
https://github.com/WebKit/WebKit/commit/5a1b7be9c6cff0a691d886cdfd2179a5e10b7ad8
Author: Richard Robinson <richard_robinson2 at apple.com>
Date: 2024-08-21 (Wed, 21 Aug 2024)
Changed paths:
M Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm
Log Message:
-----------
Occasional debug assertion in '-[WKDOMRange _initWithlmpl:]' when editing content in Mail
https://bugs.webkit.org/show_bug.cgi?id=278463
rdar://134421859
Reviewed by Aditya Keerthi.
Currently, in `WKWebProcessPlugInBrowserContextController::Client::shouldChangeSelectedRange`, if
either `fromRange` or `toRange` are empty, a debug assertion will happen in `HashTable::add`, since
`-[WKDOMRange _initWithlmpl:]` tries to add this range as a key to a HashTable, and nil keys aren't
allowed.
Fix by avoiding this from ever happening by checking if either are empty, and returning early in
this case.
* Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]):
Canonical link: https://commits.webkit.org/282569@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