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

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

Issue 905823002: Verify proper API use of acquire/release typed data (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.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) 2012, the Dart project authors. Please see the AUTHORS file 2 * Copyright (c) 2012, 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_API_H_ 7 #ifndef INCLUDE_DART_API_H_
8 #define INCLUDE_DART_API_H_ 8 #define INCLUDE_DART_API_H_
9 9
10 /** \mainpage Dart Embedding API Reference 10 /** \mainpage Dart Embedding API Reference
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after
1942 1942
1943 /** 1943 /**
1944 * Acquires access to the internal data address of a TypedData object. 1944 * Acquires access to the internal data address of a TypedData object.
1945 * 1945 *
1946 * \param object The typed data object whose internal data address is to 1946 * \param object The typed data object whose internal data address is to
1947 * be accessed. 1947 * be accessed.
1948 * \param type The type of the object is returned here. 1948 * \param type The type of the object is returned here.
1949 * \param data The internal data address is returned here. 1949 * \param data The internal data address is returned here.
1950 * \param len Size of the typed array is returned here. 1950 * \param len Size of the typed array is returned here.
1951 * 1951 *
1952 * Note: When the internal address of the object is acquired any calls to a 1952 * Notes:
1953 * Dart API function that could potentially allocate an object or run 1953 * When the internal address of the object is acquired any calls to a
1954 * any Dart code will return an error. 1954 * Dart API function that could potentially allocate an object or run
1955 * any Dart code will return an error.
1956 *
1957 * Any Dart API functions for accessing the data should not be called
1958 * before the corresponding release. In particular, the object should
1959 * not be acquired again before its release. This leads to undefined
1960 * behavior.
1955 * 1961 *
1956 * \return Success if the internal data address is acquired successfully. 1962 * \return Success if the internal data address is acquired successfully.
1957 * Otherwise, returns an error handle. 1963 * Otherwise, returns an error handle.
1958 */ 1964 */
1959 DART_EXPORT Dart_Handle Dart_TypedDataAcquireData(Dart_Handle object, 1965 DART_EXPORT Dart_Handle Dart_TypedDataAcquireData(Dart_Handle object,
1960 Dart_TypedData_Type* type, 1966 Dart_TypedData_Type* type,
1961 void** data, 1967 void** data,
1962 intptr_t* len); 1968 intptr_t* len);
1963 1969
1964 /** 1970 /**
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
2842 * NOTE: If multiple callbacks with the same name are registered, only the 2848 * NOTE: If multiple callbacks with the same name are registered, only the
2843 * last callback registered will be remembered. 2849 * last callback registered will be remembered.
2844 */ 2850 */
2845 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 2851 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
2846 const char* name, 2852 const char* name,
2847 Dart_ServiceRequestCallback callback, 2853 Dart_ServiceRequestCallback callback,
2848 void* user_data); 2854 void* user_data);
2849 2855
2850 2856
2851 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 2857 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698