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

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

Issue 83343002: Remove usage of deprecated APIs from cctests (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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-profile-generator.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 952cb68cec4886d5cbdea672d69622a594d78356..e484dd93047b7a996255bb240658440d165ff7b8 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -1050,15 +1050,14 @@ i::Handle<i::String> FormatMessage(i::ScriptDataImpl* data) {
i::Factory* factory = isolate->factory();
const char* message = data->BuildMessage();
i::Handle<i::String> format = v8::Utils::OpenHandle(
- *v8::String::New(message));
+ *v8::String::NewFromUtf8(CcTest::isolate(), 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++) {
- i::JSArray::SetElement(args_array,
- i,
- v8::Utils::OpenHandle(*v8::String::New(args[i])),
- NONE,
- i::kNonStrictMode);
+ i::JSArray::SetElement(
+ args_array, i, v8::Utils::OpenHandle(*v8::String::NewFromUtf8(
+ CcTest::isolate(), args[i])),
+ NONE, i::kNonStrictMode);
}
i::Handle<i::JSObject> builtins(isolate->js_builtins_object());
i::Handle<i::Object> format_fun =
@@ -1329,7 +1328,7 @@ TEST(PreparserStrictOctal) {
" 01; \n"
" }; \n"
"}; \n";
- v8::Script::Compile(v8::String::New(script));
+ v8::Script::Compile(v8::String::NewFromUtf8(CcTest::isolate(), script));
CHECK(try_catch.HasCaught());
v8::String::Utf8Value exception(try_catch.Exception());
CHECK_EQ("SyntaxError: Octal literals are not allowed in strict mode.",
« no previous file with comments | « test/cctest/test-object-observe.cc ('k') | test/cctest/test-profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698