| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 4ce2e1ed5c446cc58b49e94c17cfa295473715ab..408300c9937590aa7ef2f10c40b4f9e5e24eedd2 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -9100,8 +9100,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CompileString) {
|
| // strings. Throw an exception if it doesn't.
|
| if (context->allow_code_gen_from_strings()->IsFalse() &&
|
| !CodeGenerationFromStringsAllowed(isolate, context)) {
|
| - return isolate->Throw(*isolate->factory()->NewError(
|
| - "code_gen_from_strings", HandleVector<Object>(NULL, 0)));
|
| + Handle<Object> error_message =
|
| + context->ErrorMessageForCodeGenerationFromStrings();
|
| + return isolate->Throw(*isolate->factory()->NewEvalError(
|
| + "code_gen_from_strings", HandleVector<Object>(&error_message, 1)));
|
| }
|
|
|
| // Compile source string in the native context.
|
| @@ -9128,8 +9130,10 @@ static ObjectPair CompileGlobalEval(Isolate* isolate,
|
| // strings. Throw an exception if it doesn't.
|
| if (native_context->allow_code_gen_from_strings()->IsFalse() &&
|
| !CodeGenerationFromStringsAllowed(isolate, native_context)) {
|
| - isolate->Throw(*isolate->factory()->NewError(
|
| - "code_gen_from_strings", HandleVector<Object>(NULL, 0)));
|
| + Handle<Object> error_message =
|
| + context->ErrorMessageForCodeGenerationFromStrings();
|
| + isolate->Throw(*isolate->factory()->NewEvalError(
|
| + "code_gen_from_strings", HandleVector<Object>(&error_message, 1)));
|
| return MakePair(Failure::Exception(), NULL);
|
| }
|
|
|
|
|