V8 Project
v8::internal::PerIsolateAssertScope< type, allow > Class Template Reference

#include <assert-scope.h>

+ Collaboration diagram for v8::internal::PerIsolateAssertScope< type, allow >:

Classes

class  DataBit
 

Public Member Functions

 PerIsolateAssertScope (Isolate *isolate)
 
 ~PerIsolateAssertScope ()
 

Static Public Member Functions

static bool IsAllowed (Isolate *isolate)
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (PerIsolateAssertScope)
 

Private Attributes

Isolateisolate_
 
uint32_t old_data_
 

Detailed Description

template<PerIsolateAssertType type, bool allow>
class v8::internal::PerIsolateAssertScope< type, allow >

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

Constructor & Destructor Documentation

◆ PerIsolateAssertScope()

template<PerIsolateAssertType kType, bool kAllow>
v8::internal::PerIsolateAssertScope< kType, kAllow >::PerIsolateAssertScope ( Isolate isolate)
explicit

Definition at line 108 of file assert-scope.cc.

109  : isolate_(isolate), old_data_(isolate->per_isolate_assert_data()) {
110  DCHECK_NOT_NULL(isolate);
111  STATIC_ASSERT(kType < 32);
112  isolate_->set_per_isolate_assert_data(DataBit::update(old_data_, kAllow));
113 }
static U update(U previous, T value)
Definition: utils.h:223
#define DCHECK_NOT_NULL(p)
Definition: logging.h:213
STATIC_ASSERT(sizeof(CPURegister)==sizeof(Register))

References DCHECK_NOT_NULL, v8::internal::PerIsolateAssertScope< type, allow >::isolate_, v8::internal::PerIsolateAssertScope< type, allow >::old_data_, v8::internal::STATIC_ASSERT(), and v8::internal::BitFieldBase< T, shift, size, U >::update().

+ Here is the call graph for this function:

◆ ~PerIsolateAssertScope()

template<PerIsolateAssertType kType, bool kAllow>
v8::internal::PerIsolateAssertScope< kType, kAllow >::~PerIsolateAssertScope

Definition at line 117 of file assert-scope.cc.

117  {
118  isolate_->set_per_isolate_assert_data(old_data_);
119 }

Member Function Documentation

◆ DISALLOW_COPY_AND_ASSIGN()

template<PerIsolateAssertType type, bool allow>
v8::internal::PerIsolateAssertScope< type, allow >::DISALLOW_COPY_AND_ASSIGN ( PerIsolateAssertScope< type, allow >  )
private

◆ IsAllowed()

template<PerIsolateAssertType kType, bool kAllow>
bool v8::internal::PerIsolateAssertScope< kType, kAllow >::IsAllowed ( Isolate isolate)
static

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

124  {
125  return DataBit::decode(isolate->per_isolate_assert_data());
126 }
static T decode(U value)
Definition: utils.h:228

Member Data Documentation

◆ isolate_

template<PerIsolateAssertType type, bool allow>
Isolate* v8::internal::PerIsolateAssertScope< type, allow >::isolate_
private

◆ old_data_

template<PerIsolateAssertType type, bool allow>
uint32_t v8::internal::PerIsolateAssertScope< type, allow >::old_data_
private

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