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

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

Issue 8528018: Start checking inputs to dart api functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #ifndef INCLUDE_DART_API_H_ 5 #ifndef INCLUDE_DART_API_H_
6 #define INCLUDE_DART_API_H_ 6 #define INCLUDE_DART_API_H_
7 7
8 /** \mainpage Dart Embedding API Reference 8 /** \mainpage Dart Embedding API Reference
9 * 9 *
10 * Dart is a class-based programming language for creating structured 10 * Dart is a class-based programming language for creating structured
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 // --- Scripts and Libraries --- 1076 // --- Scripts and Libraries ---
1077 // TODO(turnidge): Finish documenting this section. 1077 // TODO(turnidge): Finish documenting this section.
1078 1078
1079 typedef enum { 1079 typedef enum {
1080 kLibraryTag = 0, 1080 kLibraryTag = 0,
1081 kImportTag, 1081 kImportTag,
1082 kSourceTag, 1082 kSourceTag,
1083 kCanonicalizeUrl, 1083 kCanonicalizeUrl,
1084 } Dart_LibraryTag; 1084 } Dart_LibraryTag;
1085 1085
1086 // TODO(turnidge): Document.
1086 typedef Dart_Handle (*Dart_LibraryTagHandler)(Dart_LibraryTag tag, 1087 typedef Dart_Handle (*Dart_LibraryTagHandler)(Dart_LibraryTag tag,
1087 Dart_Handle library, 1088 Dart_Handle library,
1088 Dart_Handle url); 1089 Dart_Handle url);
1089 1090
1090 /** 1091 /**
1091 * Loads the root script for the current isolate. 1092 * Loads the root script for the current isolate.
1092 * 1093 *
1093 * TODO(turnidge): Document. 1094 * TODO(turnidge): Document.
1094 */ 1095 */
1095 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, 1096 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url,
(...skipping 14 matching lines...) Expand all
1110 DART_EXPORT bool Dart_IsLibrary(Dart_Handle object); 1111 DART_EXPORT bool Dart_IsLibrary(Dart_Handle object);
1111 1112
1112 /** 1113 /**
1113 * Lookup a class by name from a Library. 1114 * Lookup a class by name from a Library.
1114 * 1115 *
1115 * \return If no errors occur, the Library is returned. Otherwise an 1116 * \return If no errors occur, the Library is returned. Otherwise an
1116 * invalid handle is returned. 1117 * invalid handle is returned.
1117 */ 1118 */
1118 DART_EXPORT Dart_Handle Dart_GetClass(Dart_Handle library, Dart_Handle name); 1119 DART_EXPORT Dart_Handle Dart_GetClass(Dart_Handle library, Dart_Handle name);
1119 1120
1121 DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library);
1122
1123 DART_EXPORT Dart_Handle Dart_LoadLibrary(Dart_Handle url,
1124 Dart_Handle source);
1125
1120 DART_EXPORT Dart_Handle Dart_LookupLibrary(Dart_Handle url); 1126 DART_EXPORT Dart_Handle Dart_LookupLibrary(Dart_Handle url);
1121 1127
1122 DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library); 1128
1123 DART_EXPORT Dart_Handle Dart_LibraryImportLibrary(Dart_Handle library, 1129 DART_EXPORT Dart_Handle Dart_LibraryImportLibrary(Dart_Handle library,
1124 Dart_Handle import); 1130 Dart_Handle import);
1125 1131
1126 DART_EXPORT Dart_Handle Dart_LoadLibrary(Dart_Handle url,
1127 Dart_Handle source);
1128 DART_EXPORT Dart_Handle Dart_LoadSource(Dart_Handle library, 1132 DART_EXPORT Dart_Handle Dart_LoadSource(Dart_Handle library,
1129 Dart_Handle url, 1133 Dart_Handle url,
1130 Dart_Handle source); 1134 Dart_Handle source);
1135 // TODO(turnidge): Rename to Dart_LibraryLoadSource?
1131 1136
1132 /** 1137 /**
1133 * Sets the callback used to resolve native functions for a library. 1138 * Sets the callback used to resolve native functions for a library.
1134 * 1139 *
1135 * \param library A library. 1140 * \param library A library.
1136 * \param resolver A native entry resolver. 1141 * \param resolver A native entry resolver.
1137 * 1142 *
1138 * \return A valid handle if the native resolver was set successfully. 1143 * \return A valid handle if the native resolver was set successfully.
1139 */ 1144 */
1140 DART_EXPORT Dart_Handle Dart_SetNativeResolver( 1145 DART_EXPORT Dart_Handle Dart_SetNativeResolver(
1141 Dart_Handle library, 1146 Dart_Handle library,
1142 Dart_NativeEntryResolver resolver); 1147 Dart_NativeEntryResolver resolver);
1148 // TODO(turnidge): Rename to Dart_LibrarySetNativeResolver?
1149
1143 1150
1144 // --- Profiling support ---- 1151 // --- Profiling support ----
1145 1152
1146 // External pprof support for gathering and dumping symbolic 1153 // External pprof support for gathering and dumping symbolic
1147 // information that can be used for better profile reports for 1154 // information that can be used for better profile reports for
1148 // dynamically generated code. 1155 // dynamically generated code.
1149 DART_EXPORT void Dart_InitPprofSupport(); 1156 DART_EXPORT void Dart_InitPprofSupport();
1150 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 1157 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
1151 1158
1152 #endif // INCLUDE_DART_API_H_ 1159 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698