| Index: src/isolate.cc
|
| diff --git a/src/isolate.cc b/src/isolate.cc
|
| index 67bdba17eaea9f68fe1871db074874bd702ff786..d42124a575f0aec262fe0a8bf6b76a5c01ec60d3 100644
|
| --- a/src/isolate.cc
|
| +++ b/src/isolate.cc
|
| @@ -1402,17 +1402,19 @@ void Isolate::DoThrow(Object* exception, MessageLocation* location) {
|
| // to the console for easier debugging.
|
| int line_number = GetScriptLineNumberSafe(location->script(),
|
| location->start_pos());
|
| - if (exception->IsString()) {
|
| + if (exception->IsString() && location->script()->name()->IsString()) {
|
| OS::PrintError(
|
| "Extension or internal compilation error: %s in %s at line %d.\n",
|
| *String::cast(exception)->ToCString(),
|
| *String::cast(location->script()->name())->ToCString(),
|
| line_number + 1);
|
| - } else {
|
| + } else if (location->script()->name()->IsString()) {
|
| OS::PrintError(
|
| "Extension or internal compilation error in %s at line %d.\n",
|
| *String::cast(location->script()->name())->ToCString(),
|
| line_number + 1);
|
| + } else {
|
| + OS::PrintError("Extension or internal compilation error.\n");
|
| }
|
| }
|
| }
|
|
|