Opened on 07/16/2014 at 01:57:36 PM

Last modified on 12/11/2014 at 09:46:05 AM

#1065 new defect

Fix AutoHandle (+tests)

Reported by: sergz Assignee:
Priority: P4 Milestone:
Module: Adblock-Plus-for-Internet-Explorer Keywords:
Cc: Blocked By:
Blocking: Platform: Internet Explorer
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

Description (last modified by sergz)

I went through the code and have not found the wrong usage, but it should be prevented in the future.

  • Sometimes the invalid value for the handle is INVALID_HANDLE_VALUE
  • always returning the non zero pointer for operator PHANDLE() is not safe
  • the behaviour of operator bool and operator HANDLE can be unexpected

Current interface

  operator HANDLE();
  operator PHANDLE();
  operator bool();

Which operator of handleX and handleY will be called in
resultCode = GetResource(someId, settings, handleX, handleY, timeout)?

Attachments (0)

Change History (2)

comment:1 Changed on 07/16/2014 at 02:01:20 PM by sergz

  • Description modified (diff)
  • Summary changed from Fix AutoHandle to Fix AutoHandle (+tests)

comment:2 Changed on 12/11/2014 at 09:46:05 AM by oleksandr

  • Platform changed from Unknown to Internet Explorer
  • Ready set

Add Comment

Modify Ticket

Change Properties
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.