Reviewers: Søren Gjesse, Description: Fixing potentially problematic usage of OS::StrDup that caused some strings to be allocated with malloc() but freed with delete[].
Please review this at http://codereview.chromium.org/48126 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/d8-debug.cc M src/flags.cc Index: src/d8-debug.cc =================================================================== --- src/d8-debug.cc (revision 1525) +++ src/d8-debug.cc (working copy) @@ -332,7 +332,7 @@ // Pass the keyboard command to the main thread. remote_debugger_->KeyboardCommand( - i::SmartPointer<char>(i::OS::StrDup(command))); + i::SmartPointer<char>(i::StrDup(command))); } } Index: src/flags.cc =================================================================== --- src/flags.cc (revision 1525) +++ src/flags.cc (working copy) @@ -248,7 +248,7 @@ args->Add(buffer.ToCString().Detach()); JSArguments jsargs = *args_flag->args_variable(); for (int j = 0; j < jsargs.argc(); j++) { - args->Add(OS::StrDup(jsargs[j])); + args->Add(StrDup(jsargs[j])); } } return args; --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
