Crashpad
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Loading...
Searching...
No Matches
crashpad::ScopedForbidReturn Class Reference

Asserts that a scope must not be exited while unsafe. More...

#include "util/misc/scoped_forbid_return.h"

Public Member Functions

 ScopedForbidReturn (const ScopedForbidReturn &)=delete
 
ScopedForbidReturnoperator= (const ScopedForbidReturn &)=delete
 
void Arm ()
 Arms the object so that it will abort execution when destroyed.
 
void Disarm ()
 Arms the object so that it will abort execution when destroyed.
 

Detailed Description

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.

Member Function Documentation

◆ Arm()

void crashpad::ScopedForbidReturn::Arm ( )
inline

Arms the object so that it will abort execution when destroyed.

The most recent call to Arm() or Disarm() sets the state of the object.

◆ Disarm()

void crashpad::ScopedForbidReturn::Disarm ( )
inline

Arms the object so that it will abort execution when destroyed.

The most recent call to Arm() or Disarm() sets the state of the object.


The documentation for this class was generated from the following files: