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

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

Issue 157543002: A64: Synchronize with r18581. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 e53250def93322a9e965ac0b2be1455856375e47..8fbd60da9d2c0456f2da11380ce9710210aa37c0 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -108,6 +108,7 @@ TEST(ScanKeywords) {
TEST(ScanHTMLEndComments) {
v8::V8::Initialize();
v8::Isolate* isolate = CcTest::isolate();
+ v8::HandleScope handles(isolate);
// Regression test. See:
// http://code.google.com/p/chromium/issues/detail?id=53548
@@ -144,15 +145,20 @@ TEST(ScanHTMLEndComments) {
reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
for (int i = 0; tests[i]; i++) {
- v8::ScriptData* data =
- v8::ScriptData::PreCompile(isolate, tests[i], i::StrLength(tests[i]));
+ v8::Handle<v8::String> source = v8::String::NewFromUtf8(
+ isolate, tests[i], v8::String::kNormalString, i::StrLength(tests[i]));
+ v8::ScriptData* data = v8::ScriptData::PreCompile(source);
CHECK(data != NULL && !data->HasError());
delete data;
}
for (int i = 0; fail_tests[i]; i++) {
- v8::ScriptData* data = v8::ScriptData::PreCompile(
- isolate, fail_tests[i], i::StrLength(fail_tests[i]));
+ v8::Handle<v8::String> source =
+ v8::String::NewFromUtf8(isolate,
+ fail_tests[i],
+ v8::String::kNormalString,
+ i::StrLength(fail_tests[i]));
+ v8::ScriptData* data = v8::ScriptData::PreCompile(source);
CHECK(data == NULL || data->HasError());
delete data;
}
@@ -199,8 +205,8 @@ TEST(Preparsing) {
const char* error_source = "var x = y z;";
int error_source_length = i::StrLength(error_source);
- v8::ScriptData* preparse =
- v8::ScriptData::PreCompile(isolate, source, source_length);
+ v8::ScriptData* preparse = v8::ScriptData::PreCompile(v8::String::NewFromUtf8(
+ isolate, source, v8::String::kNormalString, source_length));
CHECK(!preparse->HasError());
bool lazy_flag = i::FLAG_lazy;
{
@@ -223,8 +229,11 @@ TEST(Preparsing) {
i::FLAG_lazy = lazy_flag;
// Syntax error.
- v8::ScriptData* error_preparse =
- v8::ScriptData::PreCompile(isolate, error_source, error_source_length);
+ v8::ScriptData* error_preparse = v8::ScriptData::PreCompile(
+ v8::String::NewFromUtf8(isolate,
+ error_source,
+ v8::String::kNormalString,
+ error_source_length));
CHECK(error_preparse->HasError());
i::ScriptDataImpl *pre_impl =
reinterpret_cast<i::ScriptDataImpl*>(error_preparse);
« 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