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

Side by Side Diff: include/v8.h

Issue 131443008: Introduce an API mirroring the gc extension (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 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') | 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 3955 matching lines...) Expand 10 before | Expand all | Expand 10 after
3966 3966
3967 private: 3967 private:
3968 Isolate* const isolate_; 3968 Isolate* const isolate_;
3969 3969
3970 // Prevent copying of Scope objects. 3970 // Prevent copying of Scope objects.
3971 Scope(const Scope&); 3971 Scope(const Scope&);
3972 Scope& operator=(const Scope&); 3972 Scope& operator=(const Scope&);
3973 }; 3973 };
3974 3974
3975 /** 3975 /**
3976 * Types of garbage collections that can be requested via
3977 * RequestGarbageCollectionForTesting.
3978 */
3979 enum GarbageCollectionType {
3980 kFullGarbageCollection,
3981 kMinorGarbageCollection
3982 };
3983
3984 /**
3976 * Creates a new isolate. Does not change the currently entered 3985 * Creates a new isolate. Does not change the currently entered
3977 * isolate. 3986 * isolate.
3978 * 3987 *
3979 * When an isolate is no longer used its resources should be freed 3988 * When an isolate is no longer used its resources should be freed
3980 * by calling Dispose(). Using the delete operator is not allowed. 3989 * by calling Dispose(). Using the delete operator is not allowed.
3981 */ 3990 */
3982 static Isolate* New(); 3991 static Isolate* New();
3983 3992
3984 /** 3993 /**
3985 * Returns the entered isolate for the current thread or NULL in 3994 * Returns the entered isolate for the current thread or NULL in
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
4177 * Registered |callback| must not reenter interrupted Isolate. 4186 * Registered |callback| must not reenter interrupted Isolate.
4178 */ 4187 */
4179 void RequestInterrupt(InterruptCallback callback, void* data); 4188 void RequestInterrupt(InterruptCallback callback, void* data);
4180 4189
4181 /** 4190 /**
4182 * Clear interrupt request created by |RequestInterrupt|. 4191 * Clear interrupt request created by |RequestInterrupt|.
4183 * Can be called from another thread without acquiring a |Locker|. 4192 * Can be called from another thread without acquiring a |Locker|.
4184 */ 4193 */
4185 void ClearInterrupt(); 4194 void ClearInterrupt();
4186 4195
4196 /**
4197 * Request garbage collection in this Isolate. It is only valid to call this
4198 * function if --expose_gc was specified.
4199 *
4200 * This should only be used for testing purposes and not to enforce a garbage
4201 * collection schedule. It has strong negative impact on the garbage
4202 * collection performance. Use IdleNotification() or LowMemoryNotification()
4203 * instead to influence the garbage collection schedule.
4204 */
4205 void RequestGarbageCollectionForTesting(GarbageCollectionType type);
4206
4187 private: 4207 private:
4188 Isolate(); 4208 Isolate();
4189 Isolate(const Isolate&); 4209 Isolate(const Isolate&);
4190 ~Isolate(); 4210 ~Isolate();
4191 Isolate& operator=(const Isolate&); 4211 Isolate& operator=(const Isolate&);
4192 void* operator new(size_t size); 4212 void* operator new(size_t size);
4193 void operator delete(void*, size_t); 4213 void operator delete(void*, size_t);
4194 4214
4195 void SetObjectGroupId(internal::Object** object, UniqueId id); 4215 void SetObjectGroupId(internal::Object** object, UniqueId id);
4196 void SetReferenceFromGroup(UniqueId id, internal::Object** object); 4216 void SetReferenceFromGroup(UniqueId id, internal::Object** object);
(...skipping 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after
6428 */ 6448 */
6429 6449
6430 6450
6431 } // namespace v8 6451 } // namespace v8
6432 6452
6433 6453
6434 #undef TYPE_CHECK 6454 #undef TYPE_CHECK
6435 6455
6436 6456
6437 #endif // V8_H_ 6457 #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