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

Side by Side 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, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
11 #include "vm/dart_api_impl.h" 11 #include "vm/dart_api_impl.h"
(...skipping 2479 matching lines...) Expand 10 before | Expand all | Expand 10 after
2491 *buffer = NULL; 2491 *buffer = NULL;
2492 } 2492 }
2493 delete debug_region; 2493 delete debug_region;
2494 } else { 2494 } else {
2495 *buffer = NULL; 2495 *buffer = NULL;
2496 *buffer_size = 0; 2496 *buffer_size = 0;
2497 } 2497 }
2498 } 2498 }
2499 2499
2500 2500
2501 // --- Message encoding/decoding ----
2502
2503
2504 DART_EXPORT Dart_CMessage* Dart_DecodeMessage(uint8_t* message,
2505 intptr_t length,
2506 Allocator allocator) {
2507 CMessageReader reader(message, length, allocator);
2508 return reader.ReadMessage();
2509 }
2510
2501 } // namespace dart 2511 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698