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

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

Issue 86233003: - Update documentation of Dart_NewWeakPersistentHandle. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 | no next file » | 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 * Requires there to be a current isolate. 402 * Requires there to be a current isolate.
403 */ 403 */
404 DART_EXPORT void Dart_DeletePersistentHandle(Dart_PersistentHandle object); 404 DART_EXPORT void Dart_DeletePersistentHandle(Dart_PersistentHandle object);
405 405
406 /** 406 /**
407 * Allocates a weak persistent handle for an object. 407 * Allocates a weak persistent handle for an object.
408 * 408 *
409 * This handle has the lifetime of the current isolate unless it is 409 * This handle has the lifetime of the current isolate unless it is
410 * explicitly deallocated by calling Dart_DeletePersistentHandle. 410 * explicitly deallocated by calling Dart_DeletePersistentHandle.
411 * 411 *
412 * If the object becomes unreachable the callback is invoked with the weak
413 * persistent handle and the peer as arguments. This gives the native code the
414 * ability to cleanup data associated with the object and to delete the weak
415 * persistent handle. It is illegal to call into the VM from the callback,
416 * except to delete the weak persistent handle.
417 *
412 * Requires there to be a current isolate. 418 * Requires there to be a current isolate.
413 * 419 *
414 * \param object An object. 420 * \param object An object.
415 * \param peer A pointer to a native object or NULL. This value is 421 * \param peer A pointer to a native object or NULL. This value is
416 * provided to callback when it is invoked. 422 * provided to callback when it is invoked.
417 * \param callback A function pointer that will be invoked sometime 423 * \param callback A function pointer that will be invoked sometime
418 * after the object is garbage collected. 424 * after the object is garbage collected.
419 * 425 *
420 * \return Success if the weak persistent handle was 426 * \return Success if the weak persistent handle was
421 * created. Otherwise, returns an error. 427 * created. Otherwise, returns an error.
(...skipping 1917 matching lines...) Expand 10 before | Expand all | Expand 10 after
2339 * 2345 *
2340 * \param object An object. 2346 * \param object An object.
2341 * \param peer A value to store in the peer field. 2347 * \param peer A value to store in the peer field.
2342 * 2348 *
2343 * \return Returns an error if 'object' is a subtype of Null, num, or 2349 * \return Returns an error if 'object' is a subtype of Null, num, or
2344 * bool. 2350 * bool.
2345 */ 2351 */
2346 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); 2352 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer);
2347 2353
2348 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 2354 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698