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

Side by Side Diff: runtime/include/dart_native_api.h

Issue 23479010: Add length checks to ApiMessageWriter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/vm/dart_api_message.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 2 * Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
3 * for details. All rights reserved. Use of this source code is governed by a 3 * for details. All rights reserved. Use of this source code is governed by a
4 * BSD-style license that can be found in the LICENSE file. 4 * BSD-style license that can be found in the LICENSE file.
5 */ 5 */
6 6
7 #ifndef INCLUDE_DART_NATIVE_API_H_ 7 #ifndef INCLUDE_DART_NATIVE_API_H_
8 #define INCLUDE_DART_NATIVE_API_H_ 8 #define INCLUDE_DART_NATIVE_API_H_
9 9
10 #include "include/dart_api.h" 10 #include "include/dart_api.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 typedef struct _Dart_CObject { 46 typedef struct _Dart_CObject {
47 Dart_CObject_Type type; 47 Dart_CObject_Type type;
48 union { 48 union {
49 bool as_bool; 49 bool as_bool;
50 int32_t as_int32; 50 int32_t as_int32;
51 int64_t as_int64; 51 int64_t as_int64;
52 double as_double; 52 double as_double;
53 char* as_string; 53 char* as_string;
54 char* as_bigint; 54 char* as_bigint;
55 struct { 55 struct {
56 int length; 56 intptr_t length;
57 struct _Dart_CObject** values; 57 struct _Dart_CObject** values;
58 } as_array; 58 } as_array;
59 struct { 59 struct {
60 Dart_TypedData_Type type; 60 Dart_TypedData_Type type;
61 int length; 61 intptr_t length;
62 uint8_t* values; 62 uint8_t* values;
63 } as_typed_data; 63 } as_typed_data;
64 struct { 64 struct {
65 Dart_TypedData_Type type; 65 Dart_TypedData_Type type;
66 int length; 66 intptr_t length;
67 uint8_t* data; 67 uint8_t* data;
68 void* peer; 68 void* peer;
69 Dart_WeakPersistentHandleFinalizer callback; 69 Dart_WeakPersistentHandleFinalizer callback;
70 } as_external_typed_data; 70 } as_external_typed_data;
71 } value; 71 } value;
72 } Dart_CObject; 72 } Dart_CObject;
73 73
74 /** 74 /**
75 * Posts a message on some port. The message will contain the 75 * Posts a message on some port. The message will contain the
76 * Dart_CObject object graph rooted in 'message'. 76 * Dart_CObject object graph rooted in 'message'.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 */ 184 */
185 DART_EXPORT Dart_Handle Dart_CompileAll(); 185 DART_EXPORT Dart_Handle Dart_CompileAll();
186 186
187 /** 187 /**
188 * Check that all function fingerprints are OK. 188 * Check that all function fingerprints are OK.
189 * 189 *
190 */ 190 */
191 DART_EXPORT Dart_Handle Dart_CheckFunctionFingerprints(); 191 DART_EXPORT Dart_Handle Dart_CheckFunctionFingerprints();
192 192
193 #endif /* INCLUDE_DART_NATIVE_API_H_ */ /* NOLINT */ 193 #endif /* INCLUDE_DART_NATIVE_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/vm/dart_api_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698