Crashpad
Public Member Functions | List of all members
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

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

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: