Flutter Engine
zircon::dart Namespace Reference

Classes

class  Handle
 
class  HandleWaiter
 
struct  SizedRegion
 
class  System
 

Functions

 IMPLEMENT_WRAPPERTYPEINFO (zircon, Handle)
 
 IMPLEMENT_WRAPPERTYPEINFO (zircon, HandleWaiter)
 
void Initialize ()
 
 IMPLEMENT_WRAPPERTYPEINFO (zircon, System)
 

Function Documentation

◆ IMPLEMENT_WRAPPERTYPEINFO() [1/3]

zircon::dart::IMPLEMENT_WRAPPERTYPEINFO ( zircon  ,
Handle   
)

◆ IMPLEMENT_WRAPPERTYPEINFO() [2/3]

zircon::dart::IMPLEMENT_WRAPPERTYPEINFO ( zircon  ,
HandleWaiter   
)

◆ IMPLEMENT_WRAPPERTYPEINFO() [3/3]

zircon::dart::IMPLEMENT_WRAPPERTYPEINFO ( zircon  ,
System   
)

◆ Initialize()

void zircon::dart::Initialize ( )

Definition at line 66 of file natives.cc.

References tonic::DartState::Current(), FML_CHECK, tonic::LogIfError(), and tonic::ToDart().

Referenced by fuchsia::dart::Initialize().

66  {
67  Dart_Handle library = Dart_LookupLibrary(ToDart("dart:zircon"));
68  FML_CHECK(!tonic::LogIfError(library));
69  Dart_Handle result = Dart_SetNativeResolver(
70  library, zircon::dart::NativeLookup, zircon::dart::NativeSymbol);
71  FML_CHECK(!tonic::LogIfError(result));
72 
73  auto dart_state = tonic::DartState::Current();
74  std::unique_ptr<tonic::DartClassProvider> zircon_class_provider(
75  new tonic::DartClassProvider(dart_state, "dart:zircon"));
76  dart_state->class_library().add_provider("zircon",
77  std::move(zircon_class_provider));
78 }
static DartState * Current()
Definition: dart_state.cc:55
#define FML_CHECK(condition)
Definition: logging.h:68
Dart_Handle ToDart(const T &object)
bool LogIfError(Dart_Handle handle)
Definition: dart_error.cc:15