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

#include <isolate.h>

Public Member Functions

 Bequest (PersistentHandle *handle, Dart_Port beneficiary)
 
 ~Bequest ()
 
PersistentHandlehandle ()
 
PersistentHandleTakeHandle ()
 
Dart_Port beneficiary ()
 

Detailed Description

Definition at line 937 of file isolate.h.

Constructor & Destructor Documentation

◆ Bequest()

dart::Bequest::Bequest ( PersistentHandle handle,
Dart_Port  beneficiary 
)
inline

Definition at line 939 of file isolate.h.

940 : handle_(handle), beneficiary_(beneficiary) {}
PersistentHandle * handle()
Definition: isolate.h:943
Dart_Port beneficiary()
Definition: isolate.h:949

◆ ~Bequest()

dart::Bequest::~Bequest ( )

Definition at line 756 of file isolate.cc.

756 {
757 if (handle_ == nullptr) {
758 return;
759 }
760
761 IsolateGroup* isolate_group = IsolateGroup::Current();
762 CHECK_ISOLATE_GROUP(isolate_group);
763 NoSafepointScope no_safepoint_scope;
764 ApiState* state = isolate_group->api_state();
765 ASSERT(state != nullptr);
766 state->FreePersistentHandle(handle_);
767}
static IsolateGroup * Current()
Definition: isolate.h:539
#define CHECK_ISOLATE_GROUP(isolate_group)
Definition: dart_api_impl.h:31
#define ASSERT(E)
AtkStateType state

Member Function Documentation

◆ beneficiary()

Dart_Port dart::Bequest::beneficiary ( )
inline

Definition at line 949 of file isolate.h.

949{ return beneficiary_; }

◆ handle()

PersistentHandle * dart::Bequest::handle ( )
inline

Definition at line 943 of file isolate.h.

943{ return handle_; }

◆ TakeHandle()

PersistentHandle * dart::Bequest::TakeHandle ( )
inline

Definition at line 944 of file isolate.h.

944 {
945 auto handle = handle_;
946 handle_ = nullptr;
947 return handle;
948 }

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