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

Unified Diff: test/cctest/test-parsing.cc

Issue 148503002: A64: Synchronize with r15545. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 | « test/cctest/test-object-observe.cc ('k') | test/cctest/test-platform.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index 62a5bcc397273214c881ac59ab57df6a31b170e8..ee628c347501a425c5d3d1bfcab725b5a4d68331 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -633,6 +633,7 @@ void TestStreamScanner(i::Utf16CharacterStream* stream,
} while (expected_tokens[i] != i::Token::ILLEGAL);
}
+
TEST(StreamScanner) {
v8::V8::Initialize();
@@ -1048,8 +1049,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 +1070,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);
return i::Handle<i::String>::cast(result);
}
@@ -1279,7 +1286,7 @@ TEST(ParserSync) {
+ kSuffixLen + i::StrLength("label: for (;;) { }");
// Plug the source code pieces together.
- i::Vector<char> program = i::Vector<char>::New(kProgramSize + 1);
+ i::ScopedVector<char> program(kProgramSize + 1);
int length = i::OS::SNPrintF(program,
"label: for (;;) { %s%s%s%s }",
context_data[i][0],
« no previous file with comments | « test/cctest/test-object-observe.cc ('k') | test/cctest/test-platform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698