#12799: Unit test BClipboard::Clear1 crashes
------------------------------------+----------------------------
Reporter: markh | Owner: axeld
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: Kits/Application Kit | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
------------------------------------+----------------------------
Comment (by markh):
The _AssertLocked function is a private function that is only called by
the functions that want to know if it is locked or not. There does not
appear to be a good reason to call the debugger in _AssertLocked.
I would propose either returning the functionality of that procedure to
the first revision you mentioned (simply return IsLocked) or eliminating
the function altogether as it seems a bit pointless.
Regarding the return value of Clear (and Commit and Revert), the BeBook
status that it should return B_ERROR if the object is not locked and B_OK
otherwise. Even the old code did not seem to do that. It depended on what
the MakeEmpty call would do. I'm not sure what BeOS actually does here.
I would think we should follow the BeBook here and always return B_OK if
the object is locked.
--
Ticket URL: <https://dev.haiku-os.org/ticket/12799#comment:4>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.