Chromium Code Reviews| Index: test/cctest/test-parsing.cc |
| diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
| index 62a5bcc397273214c881ac59ab57df6a31b170e8..447847077f53dc01af60b0762679a08e4242d53e 100644 |
| --- a/test/cctest/test-parsing.cc |
| +++ b/test/cctest/test-parsing.cc |
| @@ -1048,8 +1048,9 @@ TEST(ScopePositions) { |
| i::Handle<i::String> FormatMessage(i::ScriptDataImpl* data) { |
| i::Isolate* isolate = i::Isolate::Current(); |
| i::Factory* factory = isolate->factory(); |
| + const char* message = data->BuildMessage(); |
| i::Handle<i::String> format = v8::Utils::OpenHandle( |
| - *v8::String::New(data->BuildMessage())); |
| + *v8::String::New(message)); |
| i::Vector<const char*> args = data->BuildArgs(); |
| i::Handle<i::JSArray> args_array = factory->NewJSArray(args.length()); |
| for (int i = 0; i < args.length(); i++) { |
| @@ -1068,6 +1069,11 @@ i::Handle<i::String> FormatMessage(i::ScriptDataImpl* data) { |
| i::Execution::Call(format_fun, builtins, 2, arg_handles, &has_exception); |
| CHECK(!has_exception); |
| CHECK(result->IsString()); |
| + for (int i = 0; i < args.length(); i++) { |
| + i::DeleteArray(args[i]); |
| + } |
| + i::DeleteArray(args.start()); |
| + i::DeleteArray(message); |
|
Dmitry Lomov (no reviews)
2013/07/04 15:22:29
Not too happy about explicit deletions here - woul
|
| return i::Handle<i::String>::cast(result); |
| } |
| @@ -1290,6 +1296,7 @@ TEST(ParserSync) { |
| i::Handle<i::String> source = |
| factory->NewStringFromAscii(i::CStrVector(program.start())); |
| TestParserSync(source); |
| + i::DeleteArray(program.start()); |
|
Dmitry Lomov (no reviews)
2013/07/04 15:22:29
Replace Vector with ScopedVector here, then explic
earthdok
2013/07/04 15:31:14
done
|
| } |
| } |
| } |