mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add methods to CefV8Value for specifying the amount of externally allocated memory associated with the V8 object (issue #478).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@469 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -535,6 +535,26 @@ class CefV8Value : public virtual CefBase {
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBase> GetUserData() =0;
|
||||
|
||||
///
|
||||
// Returns the amount of externally allocated memory registered for the
|
||||
// object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetExternallyAllocatedMemory() =0;
|
||||
|
||||
///
|
||||
// Adjusts the amount of registered external memory for the object. Used to
|
||||
// give V8 an indication of the amount of externally allocated memory that is
|
||||
// kept alive by JavaScript objects. V8 uses this information to decide when
|
||||
// to perform global garbage collection. Each CefV8Value tracks the amount of
|
||||
// external memory associated with it and automatically decreases the global
|
||||
// total by the appropriate amount on its destruction. |change_in_bytes|
|
||||
// specifies the number of bytes to adjust by. This method returns the number
|
||||
// of bytes associated with the object after the adjustment.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int AdjustExternallyAllocatedMemory(int change_in_bytes) =0;
|
||||
|
||||
|
||||
// ARRAY METHODS - These methods are only available on arrays.
|
||||
|
||||
|
Reference in New Issue
Block a user