Opened on 12/17/2015 at 02:54:49 PM

Last modified on 01/08/2016 at 02:01:00 PM

#3432 new change

Treat COM events as a resource with RAII

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):

Description

Background

The current way of registering events is ad hoc and somewhat unreliable. We have an explicit call to start events in one place and calls to stop them scattered throughout the code.

What to change

Treat a COM event registration as a resource and manage it with RAII. This simplifies the code, ensuring that events will automatically stop before the destruction of their sink object, eliminating any possibility of a null pointer dereference in the event source.

Stopping events is used to handle certain error conditions, but not in a particularly reliable way. Fixing this issue may require separating out these other concerns.

Attachments (0)

Change History (2)

comment:1 Changed on 12/17/2015 at 02:56:02 PM by eric@adblockplus.org

  • Blocked By 3382 removed
  • Blocking 3382 added

comment:2 Changed on 01/08/2016 at 02:01:00 PM by eric@adblockplus.org

  • Priority changed from Unknown to P3

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.