Reviewers: Feng Qian, Description: - Make sure to not mix allocators by using the correct StrDup function. - Include needed system header.
Please review this at http://codereview.chromium.org/11547 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/d8.cc Index: src/d8.cc =================================================================== --- src/d8.cc (revision 810) +++ src/d8.cc (working copy) @@ -26,6 +26,8 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#include <stdlib.h> + #include "d8.h" #include "debug.h" #include "api.h" @@ -77,7 +79,7 @@ char buffer[kBufferSize]; printf("%s", prompt); char* str = fgets(buffer, kBufferSize, stdin); - return i::SmartPointer<char>(str ? i::OS::StrDup(str) : str); + return i::SmartPointer<char>(str ? i::StrDup(str) : str); } --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
