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

Side by Side Diff: include/v8.h

Issue 98973002: OilPan related infrastructure on the V8 side. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add api comments. Created 7 years 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') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 4093 matching lines...) Expand 10 before | Expand all | Expand 10 after
4104 */ 4104 */
4105 enum GCType { 4105 enum GCType {
4106 kGCTypeScavenge = 1 << 0, 4106 kGCTypeScavenge = 1 << 0,
4107 kGCTypeMarkSweepCompact = 1 << 1, 4107 kGCTypeMarkSweepCompact = 1 << 1,
4108 kGCTypeAll = kGCTypeScavenge | kGCTypeMarkSweepCompact 4108 kGCTypeAll = kGCTypeScavenge | kGCTypeMarkSweepCompact
4109 }; 4109 };
4110 4110
4111 enum GCCallbackFlags { 4111 enum GCCallbackFlags {
4112 kNoGCCallbackFlags = 0, 4112 kNoGCCallbackFlags = 0,
4113 kGCCallbackFlagCompacted = 1 << 0, 4113 kGCCallbackFlagCompacted = 1 << 0,
4114 kGCCallbackFlagConstructRetainedObjectInfos = 1 << 1 4114 kGCCallbackFlagConstructRetainedObjectInfos = 1 << 1,
4115 kGCCallbackForced = 1 << 2
4115 }; 4116 };
4116 4117
4117 typedef void (*GCPrologueCallback)(GCType type, GCCallbackFlags flags); 4118 typedef void (*GCPrologueCallback)(GCType type, GCCallbackFlags flags);
4118 typedef void (*GCEpilogueCallback)(GCType type, GCCallbackFlags flags); 4119 typedef void (*GCEpilogueCallback)(GCType type, GCCallbackFlags flags);
4119 4120
4121 typedef void (*InterruptCallback)(Isolate* isolate, void* data);
4122
4120 4123
4121 /** 4124 /**
4122 * Collection of V8 heap information. 4125 * Collection of V8 heap information.
4123 * 4126 *
4124 * Instances of this class can be passed to v8::V8::HeapStatistics to 4127 * Instances of this class can be passed to v8::V8::HeapStatistics to
4125 * get heap statistics from V8. 4128 * get heap statistics from V8.
4126 */ 4129 */
4127 class V8_EXPORT HeapStatistics { 4130 class V8_EXPORT HeapStatistics {
4128 public: 4131 public:
4129 HeapStatistics(); 4132 HeapStatistics();
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
4370 */ 4373 */
4371 void AddGCEpilogueCallback( 4374 void AddGCEpilogueCallback(
4372 GCEpilogueCallback callback, GCType gc_type_filter = kGCTypeAll); 4375 GCEpilogueCallback callback, GCType gc_type_filter = kGCTypeAll);
4373 4376
4374 /** 4377 /**
4375 * This function removes callback which was installed by 4378 * This function removes callback which was installed by
4376 * AddGCEpilogueCallback function. 4379 * AddGCEpilogueCallback function.
4377 */ 4380 */
4378 void RemoveGCEpilogueCallback(GCEpilogueCallback callback); 4381 void RemoveGCEpilogueCallback(GCEpilogueCallback callback);
4379 4382
4383 /**
4384 * Request V8 to interrupt long running JavaScript code and invoke
4385 * the given |callback| passing the given |data| to it. After |callback|
4386 * returns control will be returned to the JavaScript code.
4387 * At any given moment V8 can remember only a single callback for the very
4388 * last interrupt request.
4389 * Can be called from another thread without acquiring a |Locker|.
4390 */
4391 void RequestInterrupt(InterruptCallback callback, void* data);
4392
4393 /**
4394 * Clear interrupt request created by |RequestInterrupt|.
4395 * Can be called from another thread without acquiring a |Locker|.
4396 */
4397 void ClearInterrupt();
4398
4380 private: 4399 private:
4381 Isolate(); 4400 Isolate();
4382 Isolate(const Isolate&); 4401 Isolate(const Isolate&);
4383 ~Isolate(); 4402 ~Isolate();
4384 Isolate& operator=(const Isolate&); 4403 Isolate& operator=(const Isolate&);
4385 void* operator new(size_t size); 4404 void* operator new(size_t size);
4386 void operator delete(void*, size_t); 4405 void operator delete(void*, size_t);
4387 4406
4388 void SetObjectGroupId(internal::Object** object, UniqueId id); 4407 void SetObjectGroupId(internal::Object** object, UniqueId id);
4389 void SetReferenceFromGroup(UniqueId id, internal::Object** object); 4408 void SetReferenceFromGroup(UniqueId id, internal::Object** object);
(...skipping 2369 matching lines...) Expand 10 before | Expand all | Expand 10 after
6759 */ 6778 */
6760 6779
6761 6780
6762 } // namespace v8 6781 } // namespace v8
6763 6782
6764 6783
6765 #undef TYPE_CHECK 6784 #undef TYPE_CHECK
6766 6785
6767 6786
6768 #endif // V8_H_ 6787 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698