v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
assert-scope.h File Reference
#include <stdint.h>
#include <optional>
#include "src/base/macros.h"
#include "src/base/platform/mutex.h"
#include "src/common/globals.h"
Include dependency graph for assert-scope.h:

Go to the source code of this file.

Classes

class  v8::internal::PerThreadAssertScopeEmpty< kAllow, kTypes >
 
class  v8::internal::PerThreadAssertScope< kAllow, kTypes >
 
class  v8::internal::DisallowHeapAccessIf
 
class  v8::internal::NoGarbageCollectionMutexGuard
 

Namespaces

namespace  v8
 
namespace  v8::internal
 

Macros

#define PER_ISOLATE_DCHECK_TYPE(V, enable)
 
#define PER_ISOLATE_CHECK_TYPE(V, enable)
 
#define PER_ISOLATE_ASSERT_SCOPE_DECLARATION(ScopeType)
 
#define PER_ISOLATE_ASSERT_ENABLE_SCOPE(EnableType, _1, _2, _3)
 
#define PER_ISOLATE_ASSERT_DISABLE_SCOPE(_1, DisableType, _2, _3)
 
#define PER_ISOLATE_DCHECK_ENABLE_SCOPE(EnableType, DisableType, field, _)
 
#define PER_ISOLATE_DCHECK_DISABLE_SCOPE(EnableType, DisableType, field, _)
 
#define DISALLOW_GARBAGE_COLLECTION(name)
 

Typedefs

using v8::internal::PerThreadAsserts = base::EnumSet<PerThreadAssertType, uint32_t>
 
template<bool kAllow, PerThreadAssertType... kTypes>
using v8::internal::PerThreadAssertScopeDebugOnly
 
using v8::internal::DisallowHandleAllocation
 
using v8::internal::AllowHandleAllocation
 
using v8::internal::DisallowSafepoints
 
using v8::internal::AllowSafepoints = PerThreadAssertScopeDebugOnly<true, SAFEPOINTS_ASSERT>
 
using v8::internal::DisallowHeapAllocation
 
using v8::internal::AllowHeapAllocation
 
using v8::internal::AllowHeapAllocationInRelease
 
using v8::internal::DisallowHandleDereference
 
using v8::internal::AllowHandleDereference
 
using v8::internal::AllowHandleUsageOnAllThreads
 
using v8::internal::DisallowCodeDependencyChange
 
using v8::internal::AllowCodeDependencyChange
 
using v8::internal::DisallowCodeAllocation
 
using v8::internal::AllowCodeAllocation
 
using v8::internal::DisallowGarbageCollection
 
using v8::internal::DisallowGarbageCollectionInRelease
 
using v8::internal::DisableGCMole = PerThreadAssertScopeDebugOnly<false, GC_MOLE>
 
using v8::internal::DisallowPositionInfoSlow
 
using v8::internal::AllowPositionInfoSlow
 
using v8::internal::AllowGarbageCollection
 
using v8::internal::AllowGarbageCollectionInRelease
 
using v8::internal::DisallowHeapAccess
 
using v8::internal::AllowHeapAccess
 

Enumerations

enum  v8::internal::PerThreadAssertType {
  v8::internal::ASSERT_TYPE_IS_VALID_MARKER , v8::internal::SAFEPOINTS_ASSERT , v8::internal::HEAP_ALLOCATION_ASSERT , v8::internal::HANDLE_ALLOCATION_ASSERT ,
  v8::internal::HANDLE_DEREFERENCE_ASSERT , v8::internal::HANDLE_USAGE_ON_ALL_THREADS_ASSERT , v8::internal::CODE_DEPENDENCY_CHANGE_ASSERT , v8::internal::CODE_ALLOCATION_ASSERT ,
  v8::internal::GC_MOLE , v8::internal::POSITION_INFO_SLOW_ASSERT
}
 

Macro Definition Documentation

◆ DISALLOW_GARBAGE_COLLECTION

#define DISALLOW_GARBAGE_COLLECTION ( name)

Definition at line 262 of file assert-scope.h.

◆ PER_ISOLATE_ASSERT_DISABLE_SCOPE

#define PER_ISOLATE_ASSERT_DISABLE_SCOPE ( _1,
DisableType,
_2,
_3 )
Value:
#define PER_ISOLATE_ASSERT_SCOPE_DECLARATION(ScopeType)

Definition at line 127 of file assert-scope.h.

◆ PER_ISOLATE_ASSERT_ENABLE_SCOPE

#define PER_ISOLATE_ASSERT_ENABLE_SCOPE ( EnableType,
_1,
_2,
_3 )
Value:

Definition at line 124 of file assert-scope.h.

◆ PER_ISOLATE_ASSERT_SCOPE_DECLARATION

#define PER_ISOLATE_ASSERT_SCOPE_DECLARATION ( ScopeType)
Value:
class V8_NODISCARD ScopeType { \
public: \
V8_EXPORT_PRIVATE explicit ScopeType(Isolate* isolate); \
ScopeType(const ScopeType&) = delete; \
ScopeType& operator=(const ScopeType&) = delete; \
V8_EXPORT_PRIVATE ~ScopeType(); \
\
static bool IsAllowed(Isolate* isolate); \
\
V8_EXPORT_PRIVATE static void Open(Isolate* isolate, \
bool* was_execution_allowed); \
V8_EXPORT_PRIVATE static void Close(Isolate* isolate, \
bool was_execution_allowed); \
\
private: \
Isolate* isolate_; \
bool old_data_; \
};
Isolate * isolate_
#define V8_EXPORT_PRIVATE
Definition macros.h:460
#define V8_NODISCARD
Definition v8config.h:693

Definition at line 104 of file assert-scope.h.

◆ PER_ISOLATE_CHECK_TYPE

#define PER_ISOLATE_CHECK_TYPE ( V,
enable )
Value:
/* Scope in which javascript execution leads to exception being thrown. */ \
/* Scope to introduce an exception to ThrowOnJavascriptExecution. */ \
V(NoThrowOnJavascriptExecution, ThrowOnJavascriptExecution, \
javascript_execution_throws, enable) \
/* Scope in which javascript execution causes dumps. */ \
/* Scope in which javascript execution doesn't cause dumps. */ \
V(NoDumpOnJavascriptExecution, DumpOnJavascriptExecution, \
javascript_execution_dump, enable)

Definition at line 94 of file assert-scope.h.

◆ PER_ISOLATE_DCHECK_DISABLE_SCOPE

#define PER_ISOLATE_DCHECK_DISABLE_SCOPE ( EnableType,
DisableType,
field,
_ )
Value:
class V8_NODISCARD DisableType##DebugOnly { \
public: \
explicit DisableType##DebugOnly(Isolate* isolate) {} \
};

Definition at line 157 of file assert-scope.h.

◆ PER_ISOLATE_DCHECK_ENABLE_SCOPE

#define PER_ISOLATE_DCHECK_ENABLE_SCOPE ( EnableType,
DisableType,
field,
_ )
Value:
class V8_NODISCARD EnableType##DebugOnly { \
public: \
explicit EnableType##DebugOnly(Isolate* isolate) {} \
};

Definition at line 142 of file assert-scope.h.

◆ PER_ISOLATE_DCHECK_TYPE

#define PER_ISOLATE_DCHECK_TYPE ( V,
enable )
Value:
/* Scope to document where we do not expect javascript execution. */ \
/* Scope to introduce an exception to DisallowJavascriptExecution. */ \
V(AllowJavascriptExecution, DisallowJavascriptExecution, \
javascript_execution_assert, enable) \
/* Scope to document where we do not expect deoptimization. */ \
/* Scope to introduce an exception to DisallowDeoptimization. */ \
V(AllowDeoptimization, DisallowDeoptimization, deoptimization_assert, \
enable) \
/* Scope to document where we do not expect deoptimization. */ \
/* Scope to introduce an exception to DisallowDeoptimization. */ \
V(AllowCompilation, DisallowCompilation, compilation_assert, enable) \
/* Scope to document where we do not expect exceptions. */ \
/* Scope to introduce an exception to DisallowExceptions. */ \
V(AllowExceptions, DisallowExceptions, no_exception_assert, enable)

Definition at line 78 of file assert-scope.h.