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

#include <isolate.h>

Public Member Functions

 StartIsolateScope (Isolate *new_isolate)
 
 ~StartIsolateScope ()
 

Detailed Description

Definition at line 1766 of file isolate.h.

Constructor & Destructor Documentation

◆ StartIsolateScope()

dart::StartIsolateScope::StartIsolateScope ( Isolate new_isolate)
inlineexplicit

Definition at line 1768 of file isolate.h.

1769 : new_isolate_(new_isolate), saved_isolate_(Isolate::Current()) {
1770 if (new_isolate_ == nullptr) {
1771 ASSERT(Isolate::Current() == nullptr);
1772 // Do nothing.
1773 return;
1774 }
1775 if (saved_isolate_ != new_isolate_) {
1776 ASSERT(Isolate::Current() == nullptr);
1777 Thread::EnterIsolate(new_isolate_);
1778 // Ensure this is not a nested 'isolate enter' with prior state.
1779 ASSERT(Thread::Current()->top_exit_frame_info() == 0);
1780 }
1781 }
static Isolate * Current()
Definition: isolate.h:986
static Thread * Current()
Definition: thread.h:362
static void EnterIsolate(Isolate *isolate)
Definition: thread.cc:371
#define ASSERT(E)

◆ ~StartIsolateScope()

dart::StartIsolateScope::~StartIsolateScope ( )
inline

Definition at line 1783 of file isolate.h.

1783 {
1784 if (new_isolate_ == nullptr) {
1785 ASSERT(Isolate::Current() == nullptr);
1786 // Do nothing.
1787 return;
1788 }
1789 if (saved_isolate_ != new_isolate_) {
1790 ASSERT(saved_isolate_ == nullptr);
1791 // ASSERT that we have bottomed out of all Dart invocations.
1792 ASSERT(Thread::Current()->top_exit_frame_info() == 0);
1794 }
1795 }
static void ExitIsolate(bool isolate_shutdown=false)
Definition: thread.cc:428

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