Crashpad
|
Asserts that a scope must not be exited while unsafe. More...
#include "util/misc/scoped_forbid_return.h"
Public Member Functions | |
void | Arm () |
Arms the object so that it will abort execution when destroyed. More... | |
void | Disarm () |
Arms the object so that it will abort execution when destroyed. More... | |
Asserts that a scope must not be exited while unsafe.
An object of this class has two states: armed and disarmed. A disarmed object is a harmless no-op. An armed object will abort execution upon destruction. Newly-constructed objects are armed by default.
These objects may be used to assert that a scope not be exited while it is unsafe to do so. If it ever becomes safe to leave such a scope, an object can be disarmed.
|
inline |
|
inline |