Opened on 01/12/2018 at 08:00:30 PM

Last modified on 10/08/2019 at 06:03:50 PM

#6254 new change

Fix potential race conditions

Reported by: asmirnov Assignee:
Priority: P2 Milestone:
Module: Adblock-Plus-for-Chromium Keywords:
Cc: Blocked By:
Blocking: Platform: Android
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Background

We should take care about concurrency. Let's say in background threads (see adblock_bridge.cc https://gitlab.com/adblockplus/chromium/blob/abp/chrome/browser/android/adblock/adblock_bridge.cc#L245) we check for filterEnginePtr to be not null. If it's not we continue working with it. But it can be released actually but setting null from java side to c++ not yet sent/received:
https://gitlab.com/adblockplus/chromium/blob/abp/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java#L1981

FilterEngine is mostly accessed from background but creating/releasing happens in main thread.

What to change

We need to change the way "don't use it anymore" notifications is sent or prevent filter engine from actual disposing until it not needed anymore.

Attachments (0)

Change History (2)

comment:1 Changed on 07/09/2019 at 11:16:54 AM by elimitix

spam

Last edited on 10/08/2019 at 06:03:47 PM by kzar

comment:2 Changed on 08/01/2019 at 04:23:28 PM by slotxo777

spam

Last edited on 10/08/2019 at 06:03:50 PM by kzar

Add Comment

Modify Ticket

Change Properties
Action
as new .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from (none).
Next status will be 'reviewing'.
 
Note: See TracTickets for help on using tickets.