Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(773)

Unified Diff: test/cctest/cctest.cc

Issue 42329: Getting rid of OS::StrDup and OS::StrNDup which were sometimes misused. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform-win32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/cctest.cc
===================================================================
--- test/cctest/cctest.cc (revision 1525)
+++ test/cctest/cctest.cc (working copy)
@@ -44,9 +44,9 @@
basename = strrchr(const_cast<char *>(file), '\\');
}
if (!basename) {
- basename = v8::internal::OS::StrDup(file);
+ basename = v8::internal::StrDup(file);
} else {
- basename = v8::internal::OS::StrDup(basename + 1);
+ basename = v8::internal::StrDup(basename + 1);
}
// Drop the extension, if there is one.
char *extension = strrchr(basename, '.');
@@ -82,7 +82,7 @@
print_run_count = false;
} else {
- char* arg_copy = v8::internal::OS::StrDup(arg);
+ char* arg_copy = v8::internal::StrDup(arg);
char* testname = strchr(arg_copy, '/');
if (testname) {
// Split the string in two by nulling the slash and then run
@@ -115,7 +115,7 @@
test = test->prev();
}
}
- free(arg_copy);
+ v8::internal::DeleteArray<char>(arg_copy);
}
}
if (print_run_count && tests_run != 1)
« no previous file with comments | « src/platform-win32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698