Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index 62319203f418c4522b103b3d54ced4e43f09971b..1938da89e82cb1ddbf321a64994c73943c9d0b9b 100644 |
| --- a/include/v8.h |
| +++ b/include/v8.h |
| @@ -5511,6 +5511,14 @@ class V8_EXPORT Isolate { |
| }; |
| /** |
| + * Memory pressure level for the MemoryPressureNotification. |
| + * kNone hints V8 that there is no memory pressure. |
| + * kModerate hints V8 to speed up incremental garbage collection. |
| + * kCritical hints V8 to free memory as soon as possible. |
| + */ |
| + enum class MemoryPressureLevel { kNone, kModerate, kCritical }; |
| + |
| + /** |
| * Features reported via the SetUseCounterCallback callback. Do not change |
| * assigned numbers of existing items; add new features to the end of this |
| * list. |
| @@ -5591,6 +5599,14 @@ class V8_EXPORT Isolate { |
| AbortOnUncaughtExceptionCallback callback); |
| /** |
| + * Optional notification that the system is running low on memory. |
| + * V8 uses these notifications to guide heuristics. |
| + * It is allowed to call this function from another thread while |
| + * the isolate is executing long running JavaScript code. |
|
jochen (gone - plz use gerrit)
2016/03/17 19:33:39
do we expect the embedder to set the pressure leve
ulan
2016/03/18 12:49:40
That it nice to have, but we do not rely on that.
|
| + */ |
| + void MemoryPressureNotification(MemoryPressureLevel level); |
| + |
| + /** |
| * Methods below this point require holding a lock (using Locker) in |
| * a multi-threaded environment. |
| */ |