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

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

Issue 98293004: Experimental scanner: support preparsing API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years 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 | « src/parser.cc ('k') | no next file » | 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 9b1e8eb8500cda8b5331251d0729281f05f35062..eaa503b458cfa3101b667ea8f90b727e2cf330be 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -327,10 +327,11 @@ TEST(RegressChromium62639) {
// and then used the invalid currently scanned literal. This always
// failed in debug mode, and sometimes crashed in release mode.
- i::Utf8ToUtf16CharacterStream stream(
- reinterpret_cast<const i::byte*>(program),
- static_cast<unsigned>(strlen(program)));
- i::ScriptDataImpl* data = i::PreParserApi::PreParse(isolate, &stream);
+ v8::HandleScope handles(CcTest::isolate());
+ i::Handle<i::String> source = isolate->factory()->NewStringFromAscii(
+ i::Vector<const char>(reinterpret_cast<const char*>(program),
+ strlen(program)));
+ i::ScriptDataImpl* data = i::PreParserApi::PreParse(isolate, source);
CHECK(data->HasError());
delete data;
}
@@ -356,8 +357,7 @@ TEST(Regress928) {
v8::HandleScope handles(CcTest::isolate());
i::Handle<i::String> source(
factory->NewStringFromAscii(i::CStrVector(program)));
- i::GenericStringUtf16CharacterStream stream(source, 0, source->length());
- i::ScriptDataImpl* data = i::PreParserApi::PreParse(isolate, &stream);
+ i::ScriptDataImpl* data = i::PreParserApi::PreParse(isolate, source);
CHECK(!data->HasError());
data->Initialize();
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698