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 5031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5042 kObjectSpaceCodeSpace | kObjectSpaceMapSpace | | 5042 kObjectSpaceCodeSpace | kObjectSpaceMapSpace | |
5043 kObjectSpaceLoSpace | 5043 kObjectSpaceLoSpace |
5044 }; | 5044 }; |
5045 | 5045 |
5046 enum AllocationAction { | 5046 enum AllocationAction { |
5047 kAllocationActionAllocate = 1 << 0, | 5047 kAllocationActionAllocate = 1 << 0, |
5048 kAllocationActionFree = 1 << 1, | 5048 kAllocationActionFree = 1 << 1, |
5049 kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree | 5049 kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree |
5050 }; | 5050 }; |
5051 | 5051 |
5052 typedef void (*MemoryAllocationCallback)(ObjectSpace space, | |
5053 AllocationAction action, | |
5054 int size); | |
5055 | |
5056 // --- Enter/Leave Script Callback --- | 5052 // --- Enter/Leave Script Callback --- |
5057 typedef void (*BeforeCallEnteredCallback)(Isolate*); | 5053 typedef void (*BeforeCallEnteredCallback)(Isolate*); |
5058 typedef void (*CallCompletedCallback)(Isolate*); | 5054 typedef void (*CallCompletedCallback)(Isolate*); |
5059 typedef void (*DeprecatedCallCompletedCallback)(); | 5055 typedef void (*DeprecatedCallCompletedCallback)(); |
5060 | 5056 |
5061 // --- Promise Reject Callback --- | 5057 // --- Promise Reject Callback --- |
5062 enum PromiseRejectEvent { | 5058 enum PromiseRejectEvent { |
5063 kPromiseRejectWithNoHandler = 0, | 5059 kPromiseRejectWithNoHandler = 0, |
5064 kPromiseHandlerAddedAfterReject = 1 | 5060 kPromiseHandlerAddedAfterReject = 1 |
5065 }; | 5061 }; |
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6245 | 6241 |
6246 /** | 6242 /** |
6247 * Tells V8 to capture current stack trace when uncaught exception occurs | 6243 * Tells V8 to capture current stack trace when uncaught exception occurs |
6248 * and report it to the message listeners. The option is off by default. | 6244 * and report it to the message listeners. The option is off by default. |
6249 */ | 6245 */ |
6250 void SetCaptureStackTraceForUncaughtExceptions( | 6246 void SetCaptureStackTraceForUncaughtExceptions( |
6251 bool capture, int frame_limit = 10, | 6247 bool capture, int frame_limit = 10, |
6252 StackTrace::StackTraceOptions options = StackTrace::kOverview); | 6248 StackTrace::StackTraceOptions options = StackTrace::kOverview); |
6253 | 6249 |
6254 /** | 6250 /** |
6255 * Enables the host application to provide a mechanism to be notified | |
6256 * and perform custom logging when V8 Allocates Executable Memory. | |
6257 */ | |
6258 void V8_DEPRECATED( | |
6259 "Use a combination of RequestInterrupt and GCCallback instead", | |
6260 AddMemoryAllocationCallback(MemoryAllocationCallback callback, | |
6261 ObjectSpace space, AllocationAction action)); | |
6262 | |
6263 /** | |
6264 * Removes callback that was installed by AddMemoryAllocationCallback. | |
6265 */ | |
6266 void V8_DEPRECATED( | |
6267 "Use a combination of RequestInterrupt and GCCallback instead", | |
6268 RemoveMemoryAllocationCallback(MemoryAllocationCallback callback)); | |
6269 | |
6270 /** | |
6271 * Iterates through all external resources referenced from current isolate | 6251 * Iterates through all external resources referenced from current isolate |
6272 * heap. GC is not invoked prior to iterating, therefore there is no | 6252 * heap. GC is not invoked prior to iterating, therefore there is no |
6273 * guarantee that visited objects are still alive. | 6253 * guarantee that visited objects are still alive. |
6274 */ | 6254 */ |
6275 void VisitExternalResources(ExternalResourceVisitor* visitor); | 6255 void VisitExternalResources(ExternalResourceVisitor* visitor); |
6276 | 6256 |
6277 /** | 6257 /** |
6278 * Iterates through all the persistent handles in the current isolate's heap | 6258 * Iterates through all the persistent handles in the current isolate's heap |
6279 * that have class_ids. | 6259 * that have class_ids. |
6280 */ | 6260 */ |
(...skipping 2462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8743 */ | 8723 */ |
8744 | 8724 |
8745 | 8725 |
8746 } // namespace v8 | 8726 } // namespace v8 |
8747 | 8727 |
8748 | 8728 |
8749 #undef TYPE_CHECK | 8729 #undef TYPE_CHECK |
8750 | 8730 |
8751 | 8731 |
8752 #endif // INCLUDE_V8_H_ | 8732 #endif // INCLUDE_V8_H_ |
OLD | NEW |