Skip to content

Commit

Permalink
Speculative password import prompt crash fix (#3542)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1203822806345703/1208648341254407/f
CC: @dbajpeyi 

**Description**:

There's a crash in moderate numbers which is occurring during the
password import prompt flow. This is speculative fix for that.

The reason seemed to be that the replyHandler was being called too many
times. However:

- The docs for
`userContentController:didReceiveScriptMessage:replyHandler:` say "The
replyHandler can be called at most once. If the replyHandler is
deallocated before it is called, the Promise will be rejected with a
JavaScript Error object
with an appropriate message indicating the handler was never called."
- In the case of startCredentialsImportFlow where the crash is
occurring, the JS is not awaiting. So there is no need to call the
replyHandler.

**Steps to test this PR:**
Just smoke tests for the feature:
https://app.asana.com/0/1142021229838617/1208543152554655/f

**Definition of Done**:

* [ ] Does this PR satisfy our [Definition of
Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)?

---
###### Internal references:
[Pull Request Review
Checklist](https://app.asana.com/0/1202500774821704/1203764234894239/f)
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
[Pull Request
Documentation](https://app.asana.com/0/1202500774821704/1204012835277482/f)
  • Loading branch information
graeme authored Nov 14, 2024
1 parent ff9eacd commit 8b531a5
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15066,7 +15066,7 @@
repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 209.1.0;
version = 209.1.2;
};
};
9FF521422BAA8FF300B9819B /* XCRemoteSwiftPackageReference "lottie-spm" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/BrowserServicesKit",
"state" : {
"revision" : "948420e704ea4d9412a4fc3e2c2ab0d5ea5fe5d7",
"version" : "209.1.0"
"revision" : "16a1f44f24fd492a87fc28571cac87022c1b740b",
"version" : "209.1.2"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/DataBrokerProtection/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let package = Package(
targets: ["DataBrokerProtection"])
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "209.1.0"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "209.1.2"),
.package(path: "../SwiftUIExtensions"),
.package(path: "../AppKitExtensions"),
.package(path: "../XPCHelper"),
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/FeatureFlags/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let package = Package(
targets: ["FeatureFlags"]),
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "209.1.0"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "209.1.2"),
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/NetworkProtectionMac/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let package = Package(
.library(name: "VPNAppLauncher", targets: ["VPNAppLauncher"]),
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "209.1.0"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "209.1.2"),
.package(url: "https://github.com/airbnb/lottie-spm", exact: "4.4.3"),
.package(path: "../AppLauncher"),
.package(path: "../UDSHelper"),
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/SubscriptionUI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let package = Package(
targets: ["SubscriptionUI"]),
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "209.1.0"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "209.1.2"),
.package(path: "../SwiftUIExtensions")
],
targets: [
Expand Down

0 comments on commit 8b531a5

Please sign in to comment.