OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2628 enum AllocationAction { | 2628 enum AllocationAction { |
2629 kAllocationActionAllocate = 1 << 0, | 2629 kAllocationActionAllocate = 1 << 0, |
2630 kAllocationActionFree = 1 << 1, | 2630 kAllocationActionFree = 1 << 1, |
2631 kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree | 2631 kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree |
2632 }; | 2632 }; |
2633 | 2633 |
2634 typedef void (*MemoryAllocationCallback)(ObjectSpace space, | 2634 typedef void (*MemoryAllocationCallback)(ObjectSpace space, |
2635 AllocationAction action, | 2635 AllocationAction action, |
2636 int size); | 2636 int size); |
2637 | 2637 |
2638 // --- Leave Script Callback --- | |
2639 typedef void (*CallCompletedCallback)(); | |
2640 | |
2638 // --- Failed Access Check Callback --- | 2641 // --- Failed Access Check Callback --- |
2639 typedef void (*FailedAccessCheckCallback)(Local<Object> target, | 2642 typedef void (*FailedAccessCheckCallback)(Local<Object> target, |
2640 AccessType type, | 2643 AccessType type, |
2641 Local<Value> data); | 2644 Local<Value> data); |
2642 | 2645 |
2643 // --- AllowCodeGenerationFromStrings callbacks --- | 2646 // --- AllowCodeGenerationFromStrings callbacks --- |
2644 | 2647 |
2645 /** | 2648 /** |
2646 * Callback to check if code generation from strings is allowed. See | 2649 * Callback to check if code generation from strings is allowed. See |
2647 * Context::AllowCodeGenerationFromStrings. | 2650 * Context::AllowCodeGenerationFromStrings. |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3032 ObjectSpace space, | 3035 ObjectSpace space, |
3033 AllocationAction action); | 3036 AllocationAction action); |
3034 | 3037 |
3035 /** | 3038 /** |
3036 * This function removes callback which was installed by | 3039 * This function removes callback which was installed by |
3037 * AddMemoryAllocationCallback function. | 3040 * AddMemoryAllocationCallback function. |
3038 */ | 3041 */ |
3039 static void RemoveMemoryAllocationCallback(MemoryAllocationCallback callback); | 3042 static void RemoveMemoryAllocationCallback(MemoryAllocationCallback callback); |
3040 | 3043 |
3041 /** | 3044 /** |
3045 * Adds a callback to notify the host application when a script finished | |
3046 * running. In case of recursive scripts, the callback is only triggered | |
danno
2012/01/03 15:35:12
"recursive" is a bit misleading. How about "If a s
| |
3047 * when the outer most recursion ends. | |
3048 */ | |
3049 static void AddCallCompletedCallback(CallCompletedCallback callback); | |
3050 | |
3051 /** | |
3052 * This function removes callback which was installed by | |
3053 * AddLeaveScriptCallback function. | |
3054 */ | |
3055 static void RemoveCallCompletedCallback(CallCompletedCallback callback); | |
3056 | |
3057 /** | |
3042 * Allows the host application to group objects together. If one | 3058 * Allows the host application to group objects together. If one |
3043 * object in the group is alive, all objects in the group are alive. | 3059 * object in the group is alive, all objects in the group are alive. |
3044 * After each garbage collection, object groups are removed. It is | 3060 * After each garbage collection, object groups are removed. It is |
3045 * intended to be used in the before-garbage-collection callback | 3061 * intended to be used in the before-garbage-collection callback |
3046 * function, for instance to simulate DOM tree connections among JS | 3062 * function, for instance to simulate DOM tree connections among JS |
3047 * wrapper objects. | 3063 * wrapper objects. |
3048 * See v8-profiler.h for RetainedObjectInfo interface description. | 3064 * See v8-profiler.h for RetainedObjectInfo interface description. |
3049 */ | 3065 */ |
3050 static void AddObjectGroup(Persistent<Value>* objects, | 3066 static void AddObjectGroup(Persistent<Value>* objects, |
3051 size_t length, | 3067 size_t length, |
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4232 | 4248 |
4233 | 4249 |
4234 } // namespace v8 | 4250 } // namespace v8 |
4235 | 4251 |
4236 | 4252 |
4237 #undef V8EXPORT | 4253 #undef V8EXPORT |
4238 #undef TYPE_CHECK | 4254 #undef TYPE_CHECK |
4239 | 4255 |
4240 | 4256 |
4241 #endif // V8_H_ | 4257 #endif // V8_H_ |
OLD | NEW |