| Index: src/scopes.cc
|
| diff --git a/src/scopes.cc b/src/scopes.cc
|
| index 5a9169547e4fedfec3bf2cc3c07f21cc8a6da5a3..e1297b332ca52bd224bce0129ae3c72d3419ceac 100644
|
| --- a/src/scopes.cc
|
| +++ b/src/scopes.cc
|
| @@ -1080,9 +1080,10 @@ bool Scope::ResolveVariable(CompilationInfo* info,
|
| Isolate* isolate = info->isolate();
|
| Factory* factory = isolate->factory();
|
| Handle<JSArray> array = factory->NewJSArray(0);
|
| - Handle<Object> result =
|
| + Handle<Object> error;
|
| + MaybeHandle<Object> maybe_error =
|
| factory->NewSyntaxError("harmony_const_assign", array);
|
| - isolate->Throw(*result, &location);
|
| + if (maybe_error.ToHandle(&error)) isolate->Throw(*error, &location);
|
| return false;
|
| }
|
|
|
| @@ -1114,9 +1115,10 @@ bool Scope::ResolveVariable(CompilationInfo* info,
|
| Factory* factory = isolate->factory();
|
| Handle<JSArray> array = factory->NewJSArray(1);
|
| JSObject::SetElement(array, 0, var->name(), NONE, STRICT).Assert();
|
| - Handle<Object> result =
|
| + Handle<Object> error;
|
| + MaybeHandle<Object> maybe_error =
|
| factory->NewSyntaxError("module_type_error", array);
|
| - isolate->Throw(*result, &location);
|
| + if (maybe_error.ToHandle(&error)) isolate->Throw(*error, &location);
|
| return false;
|
| }
|
| }
|
|
|