Opened 5 years ago

Last modified 5 years ago

#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)?

Change History (2)

comment:1 Changed 5 years ago by sergz

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

comment:2 Changed 5 years ago by oleksandr

  • Platform changed from Unknown to Internet Explorer
  • Ready set
Note: See TracTickets for help on using tickets.