Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: runtime/vm/json_stream.cc

Issue 1499853004: Adds a special case for sending an int over a port with the native API. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Cleanup Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/json_stream.cc
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
index 9f942053c99ed197c36a59a3a9371438e0cae18a..a69eede2b1fb4564fdf6c5dd12bb180524fd059f 100644
--- a/runtime/vm/json_stream.cc
+++ b/runtime/vm/json_stream.cc
@@ -161,16 +161,8 @@ 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, Object::null(), Message::kNormalPriority));
}
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/message.h » ('j') | runtime/vm/native_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698