Flutter Engine
The Flutter Engine
Static Public Member Functions | List of all members
flutter::DartIO Class Reference

#include <dart_io.h>

Static Public Member Functions

static void InitForIsolate (bool may_insecurely_connect_to_all_domains, const std::string &domain_network_policy)
 

Detailed Description

Definition at line 15 of file dart_io.h.

Member Function Documentation

◆ InitForIsolate()

void flutter::DartIO::InitForIsolate ( bool  may_insecurely_connect_to_all_domains,
const std::string &  domain_network_policy 
)
static

Definition at line 18 of file dart_io.cc.

19 {
20 Dart_Handle io_lib = Dart_LookupLibrary(ToDart("dart:io"));
24
25 Dart_Handle ui_lib = Dart_LookupLibrary(ToDart("dart:ui"));
26 Dart_Handle dart_validate_args[1];
27 dart_validate_args[0] = ToDart(may_insecurely_connect_to_all_domains);
28 Dart_Handle http_connection_hook_closure =
29 Dart_Invoke(ui_lib, ToDart("_getHttpConnectionHookClosure"),
30 /*number_of_arguments=*/1, dart_validate_args);
31 FML_CHECK(!CheckAndHandleError(http_connection_hook_closure));
32 Dart_Handle http_lib = Dart_LookupLibrary(ToDart("dart:_http"));
34 Dart_Handle set_http_connection_hook_result = Dart_SetField(
35 http_lib, ToDart("_httpConnectionHook"), http_connection_hook_closure);
36 FML_CHECK(!CheckAndHandleError(set_http_connection_hook_result));
37}
DART_EXPORT Dart_Handle Dart_SetNativeResolver(Dart_Handle library, Dart_NativeEntryResolver resolver, Dart_NativeEntrySymbol symbol)
struct _Dart_Handle * Dart_Handle
Definition: dart_api.h:258
DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_Invoke(Dart_Handle target, Dart_Handle name, int number_of_arguments, Dart_Handle *arguments)
DART_EXPORT Dart_Handle Dart_LookupLibrary(Dart_Handle url)
DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_SetField(Dart_Handle container, Dart_Handle name, Dart_Handle value)
GAsyncResult * result
#define FML_CHECK(condition)
Definition: logging.h:85
Dart_NativeFunction LookupIONative(Dart_Handle name, int argument_count, bool *auto_setup_scope)
const uint8_t * LookupIONativeSymbol(Dart_NativeFunction nf)
Dart_Handle ToDart(const T &object)
bool CheckAndHandleError(Dart_Handle handle)
Definition: dart_error.cc:33

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