mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix memory leak due to CToCpp argument lists not being deleted (issue #526).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@491 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -154,6 +154,10 @@ void CefRenderHandlerCToCpp::OnPaint(CefRefPtr<CefBrowser> browser,
|
||||
dirtyRectsCount,
|
||||
dirtyRectsList,
|
||||
buffer);
|
||||
|
||||
// Restore param:dirtyRects; type: simple_vec_byref_const
|
||||
if (dirtyRectsList)
|
||||
delete [] dirtyRectsList;
|
||||
}
|
||||
|
||||
void CefRenderHandlerCToCpp::OnCursorChange(CefRefPtr<CefBrowser> browser,
|
||||
|
@@ -60,6 +60,9 @@ bool CefV8HandlerCToCpp::Execute(const CefString& name,
|
||||
&retvalStruct,
|
||||
exception.GetWritableStruct());
|
||||
|
||||
// Restore param:arguments; type: refptr_vec_diff_byref_const
|
||||
if (argumentsList)
|
||||
delete [] argumentsList;
|
||||
// Restore param:retval; type: refptr_diff_byref
|
||||
if (retvalStruct) {
|
||||
if (retvalStruct != retvalOrig) {
|
||||
|
@@ -700,6 +700,9 @@ bool CefV8ValueCToCpp::ExecuteFunction(CefRefPtr<CefV8Value> object,
|
||||
&exceptionStruct,
|
||||
rethrow_exception);
|
||||
|
||||
// Restore param:arguments; type: refptr_vec_same_byref_const
|
||||
if (argumentsList)
|
||||
delete [] argumentsList;
|
||||
// Restore param:retval; type: refptr_same_byref
|
||||
if (retvalStruct) {
|
||||
if (retvalStruct != retvalOrig) {
|
||||
@@ -769,6 +772,9 @@ bool CefV8ValueCToCpp::ExecuteFunctionWithContext(
|
||||
&exceptionStruct,
|
||||
rethrow_exception);
|
||||
|
||||
// Restore param:arguments; type: refptr_vec_same_byref_const
|
||||
if (argumentsList)
|
||||
delete [] argumentsList;
|
||||
// Restore param:retval; type: refptr_same_byref
|
||||
if (retvalStruct) {
|
||||
if (retvalStruct != retvalOrig) {
|
||||
|
Reference in New Issue
Block a user