Index: src/d8-posix.cc |
diff --git a/src/d8-posix.cc b/src/d8-posix.cc |
index 424dbbb39308c286830bfecb4631f3f91bcc3187..995838eb28124e82a8439fc65e64c12027377bdd 100644 |
--- a/src/d8-posix.cc |
+++ b/src/d8-posix.cc |
@@ -531,17 +531,17 @@ void Shell::System(const v8::FunctionCallbackInfo<v8::Value>& args) { |
void Shell::ChangeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args) { |
if (args.Length() != 1) { |
const char* message = "chdir() takes one argument"; |
- ThrowException(String::New(message)); |
+ ThrowException(args.GetIsolate(), String::New(message)); |
return; |
} |
String::Utf8Value directory(args[0]); |
if (*directory == NULL) { |
const char* message = "os.chdir(): String conversion of argument failed."; |
- ThrowException(String::New(message)); |
+ ThrowException(args.GetIsolate(), String::New(message)); |
return; |
} |
if (chdir(*directory) != 0) { |
- ThrowException(String::New(strerror(errno))); |
+ ThrowException(args.GetIsolate(), String::New(strerror(errno))); |
return; |
} |
} |
@@ -550,7 +550,7 @@ void Shell::ChangeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args) { |
void Shell::SetUMask(const v8::FunctionCallbackInfo<v8::Value>& args) { |
if (args.Length() != 1) { |
const char* message = "umask() takes one argument"; |
- ThrowException(String::New(message)); |
+ ThrowException(args.GetIsolate(), String::New(message)); |
return; |
} |
if (args[0]->IsNumber()) { |
@@ -560,7 +560,7 @@ void Shell::SetUMask(const v8::FunctionCallbackInfo<v8::Value>& args) { |
return; |
} else { |
const char* message = "umask() argument must be numeric"; |
- ThrowException(String::New(message)); |
+ ThrowException(args.GetIsolate(), String::New(message)); |
return; |
} |
} |
@@ -616,18 +616,18 @@ void Shell::MakeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args) { |
mask = args[1]->Int32Value(); |
} else { |
const char* message = "mkdirp() second argument must be numeric"; |
- ThrowException(String::New(message)); |
+ ThrowException(args.GetIsolate(), String::New(message)); |
return; |
} |
} else if (args.Length() != 1) { |
const char* message = "mkdirp() takes one or two arguments"; |
- ThrowException(String::New(message)); |
+ ThrowException(args.GetIsolate(), String::New(message)); |
return; |
} |
String::Utf8Value directory(args[0]); |
if (*directory == NULL) { |
const char* message = "os.mkdirp(): String conversion of argument failed."; |
- ThrowException(String::New(message)); |
+ ThrowException(args.GetIsolate(), String::New(message)); |
return; |
} |
mkdirp(*directory, mask); |
@@ -637,13 +637,13 @@ void Shell::MakeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args) { |
void Shell::RemoveDirectory(const v8::FunctionCallbackInfo<v8::Value>& args) { |
if (args.Length() != 1) { |
const char* message = "rmdir() takes one or two arguments"; |
- ThrowException(String::New(message)); |
+ ThrowException(args.GetIsolate(), String::New(message)); |
return; |
} |
String::Utf8Value directory(args[0]); |
if (*directory == NULL) { |
const char* message = "os.rmdir(): String conversion of argument failed."; |
- ThrowException(String::New(message)); |
+ ThrowException(args.GetIsolate(), String::New(message)); |
return; |
} |
rmdir(*directory); |
@@ -653,7 +653,7 @@ void Shell::RemoveDirectory(const v8::FunctionCallbackInfo<v8::Value>& args) { |
void Shell::SetEnvironment(const v8::FunctionCallbackInfo<v8::Value>& args) { |
if (args.Length() != 2) { |
const char* message = "setenv() takes two arguments"; |
- ThrowException(String::New(message)); |
+ ThrowException(args.GetIsolate(), String::New(message)); |
return; |
} |
String::Utf8Value var(args[0]); |
@@ -661,13 +661,13 @@ void Shell::SetEnvironment(const v8::FunctionCallbackInfo<v8::Value>& args) { |
if (*var == NULL) { |
const char* message = |
"os.setenv(): String conversion of variable name failed."; |
- ThrowException(String::New(message)); |
+ ThrowException(args.GetIsolate(), String::New(message)); |
return; |
} |
if (*value == NULL) { |
const char* message = |
"os.setenv(): String conversion of variable contents failed."; |
- ThrowException(String::New(message)); |
+ ThrowException(args.GetIsolate(), String::New(message)); |
return; |
} |
setenv(*var, *value, 1); |
@@ -677,14 +677,14 @@ void Shell::SetEnvironment(const v8::FunctionCallbackInfo<v8::Value>& args) { |
void Shell::UnsetEnvironment(const v8::FunctionCallbackInfo<v8::Value>& args) { |
if (args.Length() != 1) { |
const char* message = "unsetenv() takes one argument"; |
- ThrowException(String::New(message)); |
+ ThrowException(args.GetIsolate(), String::New(message)); |
return; |
} |
String::Utf8Value var(args[0]); |
if (*var == NULL) { |
const char* message = |
"os.setenv(): String conversion of variable name failed."; |
- ThrowException(String::New(message)); |
+ ThrowException(args.GetIsolate(), String::New(message)); |
return; |
} |
unsetenv(*var); |