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

Unified Diff: src/objects-printer.cc

Issue 1163203002: Fixed memory leak in JSDate::JSDatePrint(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index 35eea77fdf72b0fe90d5087ccfb3212c08f089ca..a5d09eff0a24d58e448a684c867d7cb406a21f70 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -574,7 +574,7 @@ void JSDate::JSDatePrint(std::ostream& os) { // NOLINT
os << " - time = NaN\n";
} else {
// TODO(svenpanne) Add some basic formatting to our streams.
- Vector<char> buf = Vector<char>::New(100);
+ ScopedVector<char> buf(100);
SNPrintF(
buf, " - time = %s %04d/%02d/%02d %02d:%02d:%02d\n",
weekdays[weekday()->IsSmi() ? Smi::cast(weekday())->value() + 1 : 0],
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698