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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 9159066: Allocate a Dart_CMessage structure when decoding a message into C structures (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 8e98e49c99bdda2ed05ad8bf02284222dbf3104d..78a95b6786b76dbf7e8a55e8adcb7d119a3e82e3 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -2498,4 +2498,14 @@ DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size) {
}
+// --- Message encoding/decoding ----
+
+
+DART_EXPORT Dart_CMessage* Dart_DecodeMessage(uint8_t* message,
+ intptr_t length,
+ Allocator allocator) {
+ CMessageReader reader(message, length, allocator);
+ return reader.ReadMessage();
+}
+
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698