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

Unified Diff: runtime/vm/native_api_impl.cc

Issue 1177153005: Enables clean VM shutdown. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove debug print Created 5 years, 5 months 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/native_api_impl.cc
diff --git a/runtime/vm/native_api_impl.cc b/runtime/vm/native_api_impl.cc
index a6688976e9924ee175f08f01754ad6959514374d..09b2cc6975254740473ba766b2721b49ff6208c1 100644
--- a/runtime/vm/native_api_impl.cc
+++ b/runtime/vm/native_api_impl.cc
@@ -23,7 +23,9 @@ static uint8_t* allocator(uint8_t* ptr, intptr_t old_size, intptr_t new_size) {
}
-DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message) {
+static bool PostCObject(Dart_Port port_id,
+ Dart_CObject* message,
+ Message::Priority priority) {
uint8_t* buffer = NULL;
ApiMessageWriter writer(&buffer, allocator);
bool success = writer.WriteCMessage(message);
@@ -32,7 +34,17 @@ DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message) {
// Post the message at the given port.
return PortMap::PostMessage(new Message(
- port_id, buffer, writer.BytesWritten(), Message::kNormalPriority));
+ port_id, buffer, writer.BytesWritten(), priority));
+}
+
+
+DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message) {
+ return PostCObject(port_id, message, Message::kNormalPriority);
+}
+
+
+DART_EXPORT bool Dart_PostOOBCObject(Dart_Port port_id, Dart_CObject* message) {
+ return PostCObject(port_id, message, Message::kOOBPriority);
}

Powered by Google App Engine
This is Rietveld 408576698