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

Keep a weak reference to UserScriptMessageBroker #2755

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

ayoy
Copy link
Contributor

@ayoy ayoy commented Apr 17, 2024

Task/Issue URL: https://app.asana.com/0/1177771139624306/1207088650619407/f
CC: @dus7

Description:
Fix a memory leak by holding a weak reference to UserScriptMessageBroker
in BSK's PerformanceMetricsSubfeature.

Steps to test this PR:
Run the app and smoke test Privacy Dashboard.
Open Memory Graph and verify that no memory leaks related to user scripts are reported.

Copy Testing:

  • Use of correct apostrophes in new copy, ie rather than '

Orientation Testing:

  • Portrait
  • Landscape

Device Testing:

  • iPhone SE (1st Gen)
  • iPhone 8
  • iPhone X
  • iPhone 14 Pro
  • iPad

OS Testing:

  • iOS 14
  • iOS 15
  • iOS 16

Theme Testing:

  • Light theme
  • Dark theme

Internal references:

Software Engineering Expectations
Technical Design Template

@ayoy ayoy requested a review from dus7 April 17, 2024 08:36
@github-actions github-actions bot added the bot: not in app board Added by automation for pull requests with tasks not added to iOS App Board Asana project label Apr 17, 2024
@ayoy ayoy removed the bot: not in app board Added by automation for pull requests with tasks not added to iOS App Board Asana project label Apr 17, 2024
@ayoy ayoy force-pushed the dominik/userscripts-memory-leaks branch from c86f8f8 to a4910cc Compare April 17, 2024 08:43
@ayoy ayoy changed the base branch from main to release/7.116.0 April 17, 2024 08:44
Copy link
Contributor

@dus7 dus7 left a comment

Choose a reason for hiding this comment

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

Looks good! No leaks. I went through the use cases which are using the MessageBroker and it seems to be working fine. 👍

@ayoy ayoy merged commit 2bbdba3 into release/7.116.0 Apr 17, 2024
13 checks passed
@ayoy ayoy deleted the dominik/userscripts-memory-leaks branch April 17, 2024 10:57
samsymons added a commit that referenced this pull request Apr 18, 2024
* main:
  Release 7.116.0-1 (#2761)
  Remove validator app (#2754)
  Fix crash when quickly adding/removing tabs in switcher (#2760)
  Fix settings navigation bar colors after reopening (#2758)
  Alpha ad-hoc lane (#2492)
  Keep a weak reference to UserScriptMessageBroker (#2755)
  Add refresh config cell to top of debug (#2735)
  VPN: Replace available interfaces in VPN metadata (#2750)
  Require device auth to be set in order to use Sync (#2722)
  Add new iOS pixels for measuring navigation  (#2730)
  Privacy pro metadata updates (#2747)
  Update autoconsent to v10.6.1 (#2734)
  Limit Stale actions to issues (#2745)
  Change DAU pixel for VPN to weekly (#2684)
  Support Autofill Domains with Port Number Suffixes (#2715)
  Update secure vault error pixels to fire daily (#2557)
  Subscription: Fix 'Back' button not present (#2741)
  Subscription State improvements + Remove SUBSCRIPTION Flag (#2726)
  Release 7.116.0-0 (#2739)
  Release 7.116.0-0 (#2737)
samsymons added a commit that referenced this pull request Apr 20, 2024
# By Daniel Bernal (11) and others
# Via Mariusz Śpiewak (3) and others
* main: (63 commits)
  Release 7.115.1-1 (#2770)
  Fix iOS auto-clearing fails to remove cookies (#2769)
  Release 7.115.1-0 (#2768)
  Fix iOS auto-clearing fails to remove cookies (#2767)
  iOS: VPN screen improvements (#2721)
  Release 7.116.0-2 (#2763)
  Remove "Thank You" prompt (#2762)
  Test to ensure that page refresh doesn't affect url bar focus (#2749)
  Add support for uploading crash reports to Sentry (#2720)
  Replace SwiftLintPlugin with SwiftLintTool (#2710)
  Release 7.116.0-1 (#2761)
  Remove validator app (#2754)
  Fix crash when quickly adding/removing tabs in switcher (#2760)
  Fix settings navigation bar colors after reopening (#2758)
  Alpha ad-hoc lane (#2492)
  Keep a weak reference to UserScriptMessageBroker (#2755)
  Add refresh config cell to top of debug (#2735)
  VPN: Replace available interfaces in VPN metadata (#2750)
  Require device auth to be set in order to use Sync (#2722)
  Add new iOS pixels for measuring navigation  (#2730)
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo/AppDelegate.swift
#	DuckDuckGo/MainViewController.swift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants