OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 6745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6756 * Allows the host application to group objects together. If one | 6756 * Allows the host application to group objects together. If one |
6757 * object in the group is alive, all objects in the group are alive. | 6757 * object in the group is alive, all objects in the group are alive. |
6758 * After each garbage collection, object groups are removed. It is | 6758 * After each garbage collection, object groups are removed. It is |
6759 * intended to be used in the before-garbage-collection callback | 6759 * intended to be used in the before-garbage-collection callback |
6760 * function, for instance to simulate DOM tree connections among JS | 6760 * function, for instance to simulate DOM tree connections among JS |
6761 * wrapper objects. Object groups for all dependent handles need to | 6761 * wrapper objects. Object groups for all dependent handles need to |
6762 * be provided for kGCTypeMarkSweepCompact collections, for all other | 6762 * be provided for kGCTypeMarkSweepCompact collections, for all other |
6763 * garbage collection types it is sufficient to provide object groups | 6763 * garbage collection types it is sufficient to provide object groups |
6764 * for partially dependent handles only. | 6764 * for partially dependent handles only. |
6765 */ | 6765 */ |
6766 template<typename T> void SetObjectGroupId(const Persistent<T>& object, | 6766 template <typename T> |
6767 UniqueId id); | 6767 V8_DEPRECATE_SOON("Use EmbedderHeapTracer", |
| 6768 void SetObjectGroupId(const Persistent<T>& object, |
| 6769 UniqueId id)); |
6768 | 6770 |
6769 /** | 6771 /** |
6770 * Allows the host application to declare implicit references from an object | 6772 * Allows the host application to declare implicit references from an object |
6771 * group to an object. If the objects of the object group are alive, the child | 6773 * group to an object. If the objects of the object group are alive, the child |
6772 * object is alive too. After each garbage collection, all implicit references | 6774 * object is alive too. After each garbage collection, all implicit references |
6773 * are removed. It is intended to be used in the before-garbage-collection | 6775 * are removed. It is intended to be used in the before-garbage-collection |
6774 * callback function. | 6776 * callback function. |
6775 */ | 6777 */ |
6776 template<typename T> void SetReferenceFromGroup(UniqueId id, | 6778 template <typename T> |
6777 const Persistent<T>& child); | 6779 V8_DEPRECATE_SOON("Use EmbedderHeapTracer", |
| 6780 void SetReferenceFromGroup(UniqueId id, |
| 6781 const Persistent<T>& child)); |
6778 | 6782 |
6779 /** | 6783 /** |
6780 * Allows the host application to declare implicit references from an object | 6784 * Allows the host application to declare implicit references from an object |
6781 * to another object. If the parent object is alive, the child object is alive | 6785 * to another object. If the parent object is alive, the child object is alive |
6782 * too. After each garbage collection, all implicit references are removed. It | 6786 * too. After each garbage collection, all implicit references are removed. It |
6783 * is intended to be used in the before-garbage-collection callback function. | 6787 * is intended to be used in the before-garbage-collection callback function. |
6784 */ | 6788 */ |
6785 template<typename T, typename S> | 6789 template <typename T, typename S> |
6786 void SetReference(const Persistent<T>& parent, const Persistent<S>& child); | 6790 V8_DEPRECATE_SOON("Use EmbedderHeapTracer", |
| 6791 void SetReference(const Persistent<T>& parent, |
| 6792 const Persistent<S>& child)); |
6787 | 6793 |
6788 typedef void (*GCCallback)(Isolate* isolate, GCType type, | 6794 typedef void (*GCCallback)(Isolate* isolate, GCType type, |
6789 GCCallbackFlags flags); | 6795 GCCallbackFlags flags); |
6790 | 6796 |
6791 /** | 6797 /** |
6792 * Enables the host application to receive a notification before a | 6798 * Enables the host application to receive a notification before a |
6793 * garbage collection. Allocations are allowed in the callback function, | 6799 * garbage collection. Allocations are allowed in the callback function, |
6794 * but the callback is not re-entrant: if the allocation inside it will | 6800 * but the callback is not re-entrant: if the allocation inside it will |
6795 * trigger the garbage collection, the callback won't be called again. | 6801 * trigger the garbage collection, the callback won't be called again. |
6796 * It is possible to specify the GCType filter for your callback. But it is | 6802 * It is possible to specify the GCType filter for your callback. But it is |
(...skipping 3010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9807 */ | 9813 */ |
9808 | 9814 |
9809 | 9815 |
9810 } // namespace v8 | 9816 } // namespace v8 |
9811 | 9817 |
9812 | 9818 |
9813 #undef TYPE_CHECK | 9819 #undef TYPE_CHECK |
9814 | 9820 |
9815 | 9821 |
9816 #endif // INCLUDE_V8_H_ | 9822 #endif // INCLUDE_V8_H_ |
OLD | NEW |