Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ private boolean handleCommonLink(String url) {

@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
// Issue #490: Some sites (notably Kotlin overrides) crashed because
// favicon arrived as null and downstream code dereferenced it. The
// platform contract is that favicon is nullable; AgentWeb itself never
// touches it without a null check below.
Comment on lines +459 to +462
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new comment is factually inconsistent with the method body: there is no null check on favicon “below” (it’s only forwarded to super.onPageStarted(...)). Consider rewording to avoid implying a null check exists (e.g., say AgentWeb doesn’t dereference favicon here), and consider adding an explicit @Nullable annotation to the favicon parameter so Kotlin overrides are forced/encouraged to declare it nullable (the project already uses androidx nullability annotations).

Copilot uses AI. Check for mistakes.
if (!mWaittingFinishSet.contains(url)) {
mWaittingFinishSet.add(url);
}
Expand Down
Loading