Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: d794fd4aec27a6051daec59169dd28fc9426056d https://github.com/WebKit/WebKit/commit/d794fd4aec27a6051daec59169dd28fc9426056d Author: Timothy Hatcher <timo...@apple.com> Date: 2024-06-20 (Thu, 20 Jun 2024)
Changed paths: M Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPITabsCocoa.mm M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionDynamicScriptsCocoa.mm M Source/WebKit/UIProcess/Extensions/WebExtensionDynamicScripts.h Log Message: ----------- Crash at WebExtensionDynamicScripts::executeScript. https://webkit.org/b/275668 rdar://130154054 Reviewed by Jeff Miller. The crash was happening because an `optional` was being accessed while not being checked for a value. We don't need to use `optional` here, so this change removes the optional uses and uses `WTF::compactMap` for the one remaining `optional` return to filter the `SourcePair` results into a `SourcePairs` `Vector`. * Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPITabsCocoa.mm: (WebKit::WebExtensionContext::tabsExecuteScript): * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionDynamicScriptsCocoa.mm: (WebKit::WebExtensionDynamicScripts::getSourcePairsForParameters): (WebKit::WebExtensionDynamicScripts::executeScript): (WebKit::WebExtensionDynamicScripts::injectStyleSheets): (WebKit::WebExtensionDynamicScripts::removeStyleSheets): * Source/WebKit/UIProcess/Extensions/WebExtensionDynamicScripts.h: Canonical link: https://commits.webkit.org/280212@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes