Commit 16bbd48f authored by ishell's avatar ishell Committed by Commit bot

Fixed memory leak in JSDate::JSDatePrint().

BUG=chromium:496013
LOG=N

Review URL: https://codereview.chromium.org/1163203002

Cr-Commit-Position: refs/heads/master@{#28809}
parent e7281251
...@@ -574,7 +574,7 @@ void JSDate::JSDatePrint(std::ostream& os) { // NOLINT ...@@ -574,7 +574,7 @@ void JSDate::JSDatePrint(std::ostream& os) { // NOLINT
os << " - time = NaN\n"; os << " - time = NaN\n";
} else { } else {
// TODO(svenpanne) Add some basic formatting to our streams. // TODO(svenpanne) Add some basic formatting to our streams.
Vector<char> buf = Vector<char>::New(100); ScopedVector<char> buf(100);
SNPrintF( SNPrintF(
buf, " - time = %s %04d/%02d/%02d %02d:%02d:%02d\n", buf, " - time = %s %04d/%02d/%02d %02d:%02d:%02d\n",
weekdays[weekday()->IsSmi() ? Smi::cast(weekday())->value() + 1 : 0], weekdays[weekday()->IsSmi() ? Smi::cast(weekday())->value() + 1 : 0],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment