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

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

Issue 24538002: add isolate parameter to ThrowException (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | « src/d8-posix.cc ('k') | test/cctest/test-accessors.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 5fd821b9c07385b53714b200f48a90a2126da75f..9fdb194e42784d26821366318f3c926b15fe5353 100644
--- a/src/extensions/externalize-string-extension.cc
+++ b/src/extensions/externalize-string-extension.cc
@@ -75,7 +75,7 @@ v8::Handle<v8::FunctionTemplate> ExternalizeStringExtension::GetNativeFunction(
void ExternalizeStringExtension::Externalize(
const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() < 1 || !args[0]->IsString()) {
- v8::ThrowException(v8::String::New(
+ args.GetIsolate()->ThrowException(v8::String::New(
"First parameter to externalizeString() must be a string."));
return;
}
@@ -84,7 +84,7 @@ void ExternalizeStringExtension::Externalize(
if (args[1]->IsBoolean()) {
force_two_byte = args[1]->BooleanValue();
} else {
- v8::ThrowException(v8::String::New(
+ args.GetIsolate()->ThrowException(v8::String::New(
"Second parameter to externalizeString() must be a boolean."));
return;
}
@@ -92,7 +92,7 @@ void ExternalizeStringExtension::Externalize(
bool result = false;
Handle<String> string = Utils::OpenHandle(*args[0].As<v8::String>());
if (string->IsExternalString()) {
- v8::ThrowException(v8::String::New(
+ args.GetIsolate()->ThrowException(v8::String::New(
"externalizeString() can't externalize twice."));
return;
}
@@ -120,7 +120,8 @@ void ExternalizeStringExtension::Externalize(
if (!result) delete resource;
}
if (!result) {
- v8::ThrowException(v8::String::New("externalizeString() failed."));
+ args.GetIsolate()->ThrowException(
+ v8::String::New("externalizeString() failed."));
return;
}
}
@@ -129,7 +130,7 @@ void ExternalizeStringExtension::Externalize(
void ExternalizeStringExtension::IsAscii(
const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() != 1 || !args[0]->IsString()) {
- v8::ThrowException(v8::String::New(
+ args.GetIsolate()->ThrowException(v8::String::New(
"isAsciiString() requires a single string argument."));
return;
}
« no previous file with comments | « src/d8-posix.cc ('k') | test/cctest/test-accessors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698