alderlopez / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
0 stars 1 forks source link

Memory leak returning zero-length strings from V8 #581

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call CefV8Value::GetStringValue() or CefV8Value::GetFunctionName() for a 
zero-length value.

What is the expected output? What do you see instead?
No string should be allocated and no memory leak should occur. Instead, an 
empty string is allocated and never freed.

Please use labels and text to provide additional information.
There are two separate issues here:

1. GetCefString() in v8_impl.cc should not populate the CefString if the length 
is zero.
2. clear() in cef_string_wrappers.h should call traits::clear() on any non-NULL 
string_ value instead of just empty() values.

Original issue reported on code.google.com by magreenb...@gmail.com on 25 Apr 2012 at 7:36

GoogleCodeExporter commented 9 years ago
Fixed in revisions 603 to 605.

Original comment by magreenb...@gmail.com on 25 Apr 2012 at 8:02