Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::NoReloadScope Class Reference

#include <thread.h>

Inheritance diagram for dart::NoReloadScope:
dart::ThreadStackResource dart::StackResource

Public Member Functions

 NoReloadScope (Thread *thread)
 
 ~NoReloadScope ()
 
- Public Member Functions inherited from dart::ThreadStackResource
 ThreadStackResource (Thread *T)
 
 ~ThreadStackResource ()
 
Threadthread () const
 
Isolateisolate () const
 
IsolateGroupisolate_group () const
 
- Public Member Functions inherited from dart::StackResource
 StackResource (ThreadState *thread)
 
virtual ~StackResource ()
 
ThreadStatethread () const
 

Additional Inherited Members

- Static Public Member Functions inherited from dart::StackResource
static void Unwind (ThreadState *thread)
 
static void UnwindAbove (ThreadState *thread, StackResource *new_top)
 

Detailed Description

Definition at line 1583 of file thread.h.

Constructor & Destructor Documentation

◆ NoReloadScope()

dart::NoReloadScope::NoReloadScope ( Thread thread)
explicit

Definition at line 1499 of file thread.cc.

1500#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
1501 thread->no_reload_scope_depth_++;
1502 ASSERT(thread->no_reload_scope_depth_ >= 0);
1503#endif // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
1504}
#define ASSERT(E)

◆ ~NoReloadScope()

dart::NoReloadScope::~NoReloadScope ( )

Definition at line 1506 of file thread.cc.

1506 {
1507#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
1508 thread()->no_reload_scope_depth_ -= 1;
1509 ASSERT(thread()->no_reload_scope_depth_ >= 0);
1510 auto isolate = thread()->isolate();
1511 const intptr_t state = thread()->safepoint_state();
1512
1513 if (thread()->no_reload_scope_depth_ == 0) {
1514 // If we were asked to go to a reload safepoint & block for a reload
1515 // safepoint operation on another thread - *while* being inside
1516 // [NoReloadScope] - we may have handled & ignored the OOB message telling
1517 // us to reload.
1518 //
1519 // Since we're exiting now the [NoReloadScope], we'll make another OOB
1520 // reload request message to ourselves, which will be handled in
1521 // well-defined place where we can perform reload.
1522 if (isolate != nullptr &&
1526 }
1527 }
1528#endif // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
1529}
@ kCheckForReload
Definition: isolate.h:975
void SendInternalLibMessage(LibMsgId msg_id, uint64_t capability)
Definition: isolate.cc:1033
uword safepoint_state()
Definition: thread.h:1031
static bool IsSafepointLevelRequested(uword state, SafepointLevel level)
Definition: thread.h:955
Isolate * isolate() const
Definition: thread.h:534
AtkStateType state
@ kGCAndDeoptAndReload
Definition: thread.h:295

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