 Chromium Code Reviews
 Chromium Code Reviews Issue 12790004:
  Made AdjustAmountOfExternalAllocatedMemory an instance method of Isolate  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 12790004:
  Made AdjustAmountOfExternalAllocatedMemory an instance method of Isolate  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| Index: include/v8.h | 
| diff --git a/include/v8.h b/include/v8.h | 
| index 7016cb5754abbcc31a4f9dd4d9080c968e604cf7..3eec7649b32c670c86ac5b68ba9f49579d64e2ce 100644 | 
| --- a/include/v8.h | 
| +++ b/include/v8.h | 
| @@ -3007,6 +3007,22 @@ class V8EXPORT Isolate { | 
| */ | 
| void GetHeapStatistics(HeapStatistics* heap_statistics); | 
| + /** | 
| + * Adjusts the amount of registered external memory. Used to give | 
| + * V8 an indication of the amount of externally allocated memory | 
| + * that is kept alive by JavaScript objects. V8 uses this to decide | 
| + * when to perform global garbage collections. Registering | 
| + * externally allocated memory will trigger global garbage | 
| + * collections more often than otherwise in an attempt to garbage | 
| 
Toon Verwaest
2013/03/13 12:57:33
than it would otherwise
 
Sven Panne
2013/03/13 13:14:13
Done.
 | 
| + * collect the JavaScript objects keeping the externally allocated | 
| 
Toon Verwaest
2013/03/13 12:57:33
keeping -> that keep
 
Sven Panne
2013/03/13 13:14:13
Done.
 | 
| + * memory alive. | 
| + * | 
| + * \param change_in_bytes the change in externally allocated memory | 
| + * that is kept alive by JavaScript objects. | 
| + * \returns the adjusted value. | 
| + */ | 
| + intptr_t AdjustAmountOfExternalAllocatedMemory(intptr_t change_in_bytes); | 
| + | 
| private: | 
| Isolate(); | 
| Isolate(const Isolate&); | 
| @@ -3487,20 +3503,8 @@ class V8EXPORT V8 { | 
| static void SetJitCodeEventHandler(JitCodeEventOptions options, | 
| JitCodeEventHandler event_handler); | 
| - /** | 
| - * Adjusts the amount of registered external memory. Used to give | 
| - * V8 an indication of the amount of externally allocated memory | 
| - * that is kept alive by JavaScript objects. V8 uses this to decide | 
| - * when to perform global garbage collections. Registering | 
| - * externally allocated memory will trigger global garbage | 
| - * collections more often than otherwise in an attempt to garbage | 
| - * collect the JavaScript objects keeping the externally allocated | 
| - * memory alive. | 
| - * | 
| - * \param change_in_bytes the change in externally allocated memory | 
| - * that is kept alive by JavaScript objects. | 
| - * \returns the adjusted value. | 
| - */ | 
| + // TODO(svenpanne) Really deprecate me when Chrome is fixed. | 
| + /** Deprecated. Use Isolate::AdjustAmountOfExternalAllocatedMemory instead. */ | 
| static intptr_t AdjustAmountOfExternalAllocatedMemory( | 
| intptr_t change_in_bytes); |