Definition at line 33 of file service_test.cc.
◆ ServiceTestMessageHandler()
dart::ServiceTestMessageHandler::ServiceTestMessageHandler |
( |
| ) |
|
|
inline |
◆ ~ServiceTestMessageHandler()
dart::ServiceTestMessageHandler::~ServiceTestMessageHandler |
( |
| ) |
|
|
inline |
Definition at line 37 of file service_test.cc.
37 {
39 free(_msg);
40 }
static void ClosePorts(MessageHandler *handler)
◆ HandleMessage()
Implements dart::MessageHandler.
Definition at line 42 of file service_test.cc.
42 {
43 if (_msg != nullptr) {
44 free(_msg);
45 _msg = nullptr;
46 }
47
48
51 response_obj =
message->raw_obj();
52 } else {
55 }
56 if (response_obj.IsString()) {
58 response ^= response_obj.ptr();
60 } else {
61 ASSERT(response_obj.IsArray());
63 response_array ^= response_obj.ptr();
64 ASSERT(response_array.Length() == 1);
66 response ^= response_array.At(0);
67 _msg =
Utils::StrDup(
reinterpret_cast<char*
>(response.DataAddr(0)));
68 }
69
71 }
static Thread * Current()
static char * StrDup(const char *s)
ObjectPtr ReadMessage(Thread *thread, Message *message)
◆ isolate()
virtual Isolate * dart::ServiceTestMessageHandler::isolate |
( |
| ) |
const |
|
inlinevirtual |
◆ msg()
const char * dart::ServiceTestMessageHandler::msg |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: