Opened on 12/08/2015 at 04:01:27 PM

Last modified on 01/25/2016 at 12:49:09 PM

#3391 reviewing defect

Detached initialization is defective in corner cases and poorly structured

Reported by: eric@adblockplus.org Assignee:
Priority: P3 Milestone:
Module: Adblock-Plus-for-Internet-Explorer Keywords:
Cc: Blocked By:
Blocking: #3382 Platform: Internet Explorer
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29332660/
https://codereview.adblockplus.org/29332665/
https://codereview.adblockplus.org/29334397/

Description

Background

Some classes require long-running initialization and perform it asynchronously in detached threads. CPluginClass performs some process-global initialization. Filters are loaded in a separate thread.

These operations are performed ad hoc and without consistency. Scoping is poor, with control not localized to the classes in which it's relevant. Synchronization is defined at point-of-use rather than within the defining scope of the variables it's initializating. Synchronization in destructors is missing entirely, with possible race conditions in short-lived objects.

What to change

  • Perform detached initialization as close to the data structures being initialized. Scope such initialization code within class definitions when feasible.
  • Provide a consistent way to determine that initialization has completed.
  • Eliminate race conditions in destructors.

Attachments (0)

Change History (2)

comment:1 Changed on 01/25/2016 at 12:48:25 PM by eric@adblockplus.org

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

comment:2 Changed on 01/25/2016 at 12:49:09 PM by eric@adblockplus.org

  • Review URL(s) modified (diff)

Add Comment

Modify Ticket

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