Opened 2 years ago

Closed 2 years ago

#6227 closed change (fixed)

Prevent UI API access on background threads

Reported by: dzhang Assignee: dzhang
Priority: Unknown Milestone: Adblock-Plus-for-iOS-next
Module: Adblock-Plus-for-iOS/macOS Keywords:
Cc: Blocked By:
Blocking: Platform: iOS
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29654584/

Description (last modified by dzhang)

Background

There are a few places where explicit UI thread dispatching is required due to a UI API being activated from a background thread or threads by KVO, the notification center or similar causes.

These operations can cause the reporting of a warning or error in Xcode 9 indicating that a UI API was called on a background thread.

See https://developer.apple.com/documentation/code_diagnostics/main_thread_checker

Preventing improper UI API access is meant to improve overall stability.

What to change

Explicitly dispatch UI operations to the UI thread where needed.

Change History (5)

comment:1 Changed 2 years ago by dzhang

  • Description modified (diff)
  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 2 years ago by dzhang

  • Description modified (diff)

comment:3 Changed 2 years ago by dzhang

  • Description modified (diff)

comment:4 Changed 2 years ago by dzhang

  • Description modified (diff)

comment:5 Changed 2 years ago by dzhang

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.