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

Side by Side Diff: include/v8.h

Issue 8937003: Implement callback when script finishes running in V8 API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed comments. Created 8 years, 11 months 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 | src/api.cc » ('j') | src/v8.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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. If a script re-enters the runtime during executing, the
3047 * CallCompletedCallback is only invoked when the outer-most script
3048 * execution ends. Executing scripts inside the callback do not trigger
3049 * further callbacks.
3050 */
3051 static void AddCallCompletedCallback(CallCompletedCallback callback);
3052
3053 /**
3054 * This function removes callback which was installed by
danno 2012/01/04 08:38:49 Just: Removes callback that was installed by AddCa
3055 * AddCallCompletedCallback function.
3056 */
3057 static void RemoveCallCompletedCallback(CallCompletedCallback callback);
3058
3059 /**
3042 * Allows the host application to group objects together. If one 3060 * Allows the host application to group objects together. If one
3043 * object in the group is alive, all objects in the group are alive. 3061 * object in the group is alive, all objects in the group are alive.
3044 * After each garbage collection, object groups are removed. It is 3062 * After each garbage collection, object groups are removed. It is
3045 * intended to be used in the before-garbage-collection callback 3063 * intended to be used in the before-garbage-collection callback
3046 * function, for instance to simulate DOM tree connections among JS 3064 * function, for instance to simulate DOM tree connections among JS
3047 * wrapper objects. 3065 * wrapper objects.
3048 * See v8-profiler.h for RetainedObjectInfo interface description. 3066 * See v8-profiler.h for RetainedObjectInfo interface description.
3049 */ 3067 */
3050 static void AddObjectGroup(Persistent<Value>* objects, 3068 static void AddObjectGroup(Persistent<Value>* objects,
3051 size_t length, 3069 size_t length,
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
4232 4250
4233 4251
4234 } // namespace v8 4252 } // namespace v8
4235 4253
4236 4254
4237 #undef V8EXPORT 4255 #undef V8EXPORT
4238 #undef TYPE_CHECK 4256 #undef TYPE_CHECK
4239 4257
4240 4258
4241 #endif // V8_H_ 4259 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/v8.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698