Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix crash on Navigation Action Task cancellation #3298

Merged
merged 5 commits into from
Sep 20, 2024

Conversation

mallexxx
Copy link
Collaborator

Task/Issue URL: https://app.asana.com/0/1207340338530322/1208145681457166/f
BSK PR: duckduckgo/BrowserServicesKit#996

Description:

  • Fix crash on Navigation Action decision making Task cancellation

Steps to test this PR:

  1. add the following code to Tab.swift decidePolicy(for:preferences:) method:
navigationAction.url.isDuckDuckGoSearch {
    try? await Task.sleep(interval: 10)
    return .allow
}
  1. Search for something; Close the tab while loading is in progress
  2. Validate cancellation: handler at DistributedNavigationDelegate.swift:412 is called and not crashing

Definition of Done:


Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@mallexxx mallexxx requested a review from ayoy September 18, 2024 06:42
@mallexxx mallexxx changed the base branch from main to alex/window-deallocation September 18, 2024 06:43
Base automatically changed from alex/window-deallocation to release/1.107.0 September 18, 2024 12:21
@mallexxx mallexxx changed the base branch from release/1.107.0 to main September 18, 2024 12:21
Copy link
Collaborator

@ayoy ayoy left a comment

Choose a reason for hiding this comment

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

LGTM 👏

mallexxx added a commit to duckduckgo/BrowserServicesKit that referenced this pull request Sep 19, 2024
Task/Issue URL: https://app.asana.com/0/1207340338530322/1208145681457166/f
iOS PR: not affected
macOS PR: duckduckgo/macos-browser#3298
What kind of version bump will this require?: Patch
@mallexxx mallexxx merged commit 05036ee into main Sep 20, 2024
19 checks passed
@mallexxx mallexxx deleted the alex/navigation-task-cancellation-crash branch September 20, 2024 05:35
ayoy pushed a commit to duckduckgo/BrowserServicesKit that referenced this pull request Sep 21, 2024
Task/Issue URL: https://app.asana.com/0/1207340338530322/1208145681457166/f
iOS PR: not affected
macOS PR: duckduckgo/macos-browser#3298
What kind of version bump will this require?: Patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants