Author: olehougaard
Date: Wed Mar 18 04:55:40 2009
New Revision: 1531
Modified:
branches/bleeding_edge/src/d8-debug.cc
branches/bleeding_edge/src/flags.cc
Log:
Fixing potentially problematic usage of OS::StrDup that caused some strings
to be allocated with malloc() but freed with delete[].
Review URL: http://codereview.chromium.org/48126
Modified: branches/bleeding_edge/src/d8-debug.cc
==============================================================================
--- branches/bleeding_edge/src/d8-debug.cc (original)
+++ branches/bleeding_edge/src/d8-debug.cc Wed Mar 18 04:55:40 2009
@@ -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)));
}
}
Modified: branches/bleeding_edge/src/flags.cc
==============================================================================
--- branches/bleeding_edge/src/flags.cc (original)
+++ branches/bleeding_edge/src/flags.cc Wed Mar 18 04:55:40 2009
@@ -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
-~----------~----~----~----~------~----~------~--~---