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 5386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5397 * Interface for tracing through the embedder heap. During the v8 garbage | 5397 * Interface for tracing through the embedder heap. During the v8 garbage |
5398 * collection, v8 collects hidden fields of all potential wrappers, and at the | 5398 * collection, v8 collects hidden fields of all potential wrappers, and at the |
5399 * end of its marking phase iterates the collection and asks the embedder to | 5399 * end of its marking phase iterates the collection and asks the embedder to |
5400 * trace through its heap and call PersistentBase::RegisterExternalReference on | 5400 * trace through its heap and call PersistentBase::RegisterExternalReference on |
5401 * each js object reachable from any of the given wrappers. | 5401 * each js object reachable from any of the given wrappers. |
5402 * | 5402 * |
5403 * Before the first call to the TraceWrappersFrom function TracePrologue will be | 5403 * Before the first call to the TraceWrappersFrom function TracePrologue will be |
5404 * called. When the garbage collection cycle is finished, TraceEpilogue will be | 5404 * called. When the garbage collection cycle is finished, TraceEpilogue will be |
5405 * called. | 5405 * called. |
5406 */ | 5406 */ |
5407 class EmbedderHeapTracer { | 5407 class V8_EXPORT EmbedderHeapTracer { |
5408 public: | 5408 public: |
5409 /** | 5409 /** |
5410 * V8 will call this method at the beginning of the gc cycle. | 5410 * V8 will call this method at the beginning of the gc cycle. |
5411 */ | 5411 */ |
5412 virtual void TracePrologue() = 0; | 5412 virtual void TracePrologue() = 0; |
5413 /** | 5413 /** |
5414 * V8 will call this method with internal fields of a potential wrappers. | 5414 * V8 will call this method with internal fields of a potential wrappers. |
5415 * Embedder is expected to trace its heap (synchronously) and call | 5415 * Embedder is expected to trace its heap (synchronously) and call |
5416 * PersistentBase::RegisterExternalReference() on all wrappers reachable from | 5416 * PersistentBase::RegisterExternalReference() on all wrappers reachable from |
5417 * any of the given wrappers. | 5417 * any of the given wrappers. |
(...skipping 3314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8732 */ | 8732 */ |
8733 | 8733 |
8734 | 8734 |
8735 } // namespace v8 | 8735 } // namespace v8 |
8736 | 8736 |
8737 | 8737 |
8738 #undef TYPE_CHECK | 8738 #undef TYPE_CHECK |
8739 | 8739 |
8740 | 8740 |
8741 #endif // INCLUDE_V8_H_ | 8741 #endif // INCLUDE_V8_H_ |
OLD | NEW |