Reviewers: Michael Starzinger,
Message:
PTAL
Description:
Fixed memory leak in JSDate::JSDatePrint().
BUG=chromium:496013
LOG=N
Please review this at https://codereview.chromium.org/1163203002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+1, -1 lines):
M src/objects-printer.cc
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],
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.