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

Unified Diff: src/extensions/externalize-string-extension.cc

Issue 83323003: Remove usage of deprecated APIs from v8 itself (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 | « src/debug.cc ('k') | src/extensions/statistics-extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/extensions/externalize-string-extension.cc
diff --git a/src/extensions/externalize-string-extension.cc b/src/extensions/externalize-string-extension.cc
index 9fdb194e42784d26821366318f3c926b15fe5353..a86ec66bf4eca49ddddbf1e5b703ca76b25f4934 100644
--- a/src/extensions/externalize-string-extension.cc
+++ b/src/extensions/externalize-string-extension.cc
@@ -75,7 +75,8 @@ v8::Handle<v8::FunctionTemplate> ExternalizeStringExtension::GetNativeFunction(
void ExternalizeStringExtension::Externalize(
const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() < 1 || !args[0]->IsString()) {
- args.GetIsolate()->ThrowException(v8::String::New(
+ args.GetIsolate()->ThrowException(v8::String::NewFromUtf8(
+ args.GetIsolate(),
"First parameter to externalizeString() must be a string."));
return;
}
@@ -84,7 +85,8 @@ void ExternalizeStringExtension::Externalize(
if (args[1]->IsBoolean()) {
force_two_byte = args[1]->BooleanValue();
} else {
- args.GetIsolate()->ThrowException(v8::String::New(
+ args.GetIsolate()->ThrowException(v8::String::NewFromUtf8(
+ args.GetIsolate(),
"Second parameter to externalizeString() must be a boolean."));
return;
}
@@ -92,7 +94,8 @@ void ExternalizeStringExtension::Externalize(
bool result = false;
Handle<String> string = Utils::OpenHandle(*args[0].As<v8::String>());
if (string->IsExternalString()) {
- args.GetIsolate()->ThrowException(v8::String::New(
+ args.GetIsolate()->ThrowException(v8::String::NewFromUtf8(
+ args.GetIsolate(),
"externalizeString() can't externalize twice."));
return;
}
@@ -120,8 +123,8 @@ void ExternalizeStringExtension::Externalize(
if (!result) delete resource;
}
if (!result) {
- args.GetIsolate()->ThrowException(
- v8::String::New("externalizeString() failed."));
+ args.GetIsolate()->ThrowException(v8::String::NewFromUtf8(
+ args.GetIsolate(), "externalizeString() failed."));
return;
}
}
@@ -130,7 +133,8 @@ void ExternalizeStringExtension::Externalize(
void ExternalizeStringExtension::IsAscii(
const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() != 1 || !args[0]->IsString()) {
- args.GetIsolate()->ThrowException(v8::String::New(
+ args.GetIsolate()->ThrowException(v8::String::NewFromUtf8(
+ args.GetIsolate(),
"isAsciiString() requires a single string argument."));
return;
}
« no previous file with comments | « src/debug.cc ('k') | src/extensions/statistics-extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698