Chromium Code Reviews| Index: runtime/vm/json_stream.cc |
| diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc |
| index 9f942053c99ed197c36a59a3a9371438e0cae18a..4189fe4bfb2061a1a1ffe031555f0af998f18095 100644 |
| --- a/runtime/vm/json_stream.cc |
| +++ b/runtime/vm/json_stream.cc |
| @@ -161,16 +161,9 @@ static uint8_t* allocator(uint8_t* ptr, intptr_t old_size, intptr_t new_size) { |
| void JSONStream::PostNullReply(Dart_Port port) { |
| - const Object& reply = Object::Handle(Object::null()); |
| - ASSERT(reply.IsNull()); |
| - |
| - uint8_t* data = NULL; |
| - MessageWriter writer(&data, &allocator, false); |
| - writer.WriteMessage(reply); |
| - PortMap::PostMessage(new Message(port, |
| - data, |
| - writer.BytesWritten(), |
| - Message::kNormalPriority)); |
| + PortMap::PostMessage(new Message( |
| + port, reinterpret_cast<uint8_t*>(Object::null()), 0, |
| + Message::kNormalPriority)); |
|
Ivan Posva
2015/12/11 21:02:39
Why not call the shortcut constructor?
zra
2015/12/11 22:01:31
Done.
|
| } |