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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index c56295ac78dd8a4c6561f97f12717e5972381520..ba0487b91519812b1ab1a979bac5760098b772a7 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -3973,6 +3973,15 @@ class V8_EXPORT Isolate {
};
/**
+ * Types of garbage collections that can be requested via
+ * RequestGarbageCollectionForTesting.
+ */
+ enum GarbageCollectionType {
+ kFullGarbageCollection,
+ kMinorGarbageCollection
+ };
+
+ /**
* Creates a new isolate. Does not change the currently entered
* isolate.
*
@@ -4184,6 +4193,17 @@ class V8_EXPORT Isolate {
*/
void ClearInterrupt();
+ /**
+ * Request garbage collection in this Isolate. It is only valid to call this
+ * function if --expose_gc was specified.
+ *
+ * This should only be used for testing purposes and not to enforce a garbage
+ * collection schedule. It has strong negative impact on the garbage
+ * collection performance. Use IdleNotification() or LowMemoryNotification()
+ * instead to influence the garbage collection schedule.
+ */
+ void RequestGarbageCollectionForTesting(GarbageCollectionType type);
+
private:
Isolate();
Isolate(const Isolate&);
« 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