| Index: src/debug.cc
|
| diff --git a/src/debug.cc b/src/debug.cc
|
| index 729f0ab304f6d461d7752b97e3b5907fd9ecedbc..18c321bda3a3e7aef70bb1e1192eb395036762a9 100644
|
| --- a/src/debug.cc
|
| +++ b/src/debug.cc
|
| @@ -52,14 +52,13 @@ namespace internal {
|
| #ifdef ENABLE_DEBUGGER_SUPPORT
|
| static void PrintLn(v8::Local<v8::Value> value) {
|
| v8::Local<v8::String> s = value->ToString();
|
| - char* data = NewArray<char>(s->Length() + 1);
|
| - if (data == NULL) {
|
| + ScopedVector<char> data(s->Length() + 1);
|
| + if (data.start() == NULL) {
|
| V8::FatalProcessOutOfMemory("PrintLn");
|
| return;
|
| }
|
| - s->WriteAscii(data);
|
| - PrintF("%s\n", data);
|
| - DeleteArray(data);
|
| + s->WriteAscii(data.start());
|
| + PrintF("%s\n", data.start());
|
| }
|
|
|
|
|
|
|