| Index: samples/shell.cc
|
| diff --git a/samples/shell.cc b/samples/shell.cc
|
| index 710547c341979eaa6f42194a1b10d2ee183a561f..d073e4173fb4c8a60bacb890797bad3c7f80c2f4 100644
|
| --- a/samples/shell.cc
|
| +++ b/samples/shell.cc
|
| @@ -140,17 +140,20 @@ void Print(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
| // the argument into a JavaScript string.
|
| void Read(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
| if (args.Length() != 1) {
|
| - v8::ThrowException(v8::String::New("Bad parameters"));
|
| + v8::ThrowException(args.GetIsolate(),
|
| + v8::String::New("Bad parameters"));
|
| return;
|
| }
|
| v8::String::Utf8Value file(args[0]);
|
| if (*file == NULL) {
|
| - v8::ThrowException(v8::String::New("Error loading file"));
|
| + v8::ThrowException(args.GetIsolate(),
|
| + v8::String::New("Error loading file"));
|
| return;
|
| }
|
| v8::Handle<v8::String> source = ReadFile(*file);
|
| if (source.IsEmpty()) {
|
| - v8::ThrowException(v8::String::New("Error loading file"));
|
| + v8::ThrowException(args.GetIsolate(),
|
| + v8::String::New("Error loading file"));
|
| return;
|
| }
|
| args.GetReturnValue().Set(source);
|
| @@ -165,12 +168,14 @@ void Load(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
| v8::HandleScope handle_scope(args.GetIsolate());
|
| v8::String::Utf8Value file(args[i]);
|
| if (*file == NULL) {
|
| - v8::ThrowException(v8::String::New("Error loading file"));
|
| + v8::ThrowException(args.GetIsolate(),
|
| + v8::String::New("Error loading file"));
|
| return;
|
| }
|
| v8::Handle<v8::String> source = ReadFile(*file);
|
| if (source.IsEmpty()) {
|
| - v8::ThrowException(v8::String::New("Error loading file"));
|
| + v8::ThrowException(args.GetIsolate(),
|
| + v8::String::New("Error loading file"));
|
| return;
|
| }
|
| if (!ExecuteString(args.GetIsolate(),
|
| @@ -178,7 +183,8 @@ void Load(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
| v8::String::New(*file),
|
| false,
|
| false)) {
|
| - v8::ThrowException(v8::String::New("Error executing file"));
|
| + v8::ThrowException(args.GetIsolate(),
|
| + v8::String::New("Error executing file"));
|
| return;
|
| }
|
| }
|
|
|