Index: src/pending-compilation-error-handler.cc |
diff --git a/src/pending-compilation-error-handler.cc b/src/pending-compilation-error-handler.cc |
index 098db62acc31d27ae8fdc98e2a879c1dffa3ee80..10a10320a6e788fac41b920c939149aec651f65b 100644 |
--- a/src/pending-compilation-error-handler.cc |
+++ b/src/pending-compilation-error-handler.cc |
@@ -41,6 +41,11 @@ void PendingCompilationErrorHandler::ThrowPendingError(Isolate* isolate, |
break; |
} |
+ if (!error->IsJSObject()) { |
+ isolate->Throw(*error, &location); |
+ return; |
+ } |
+ |
Handle<JSObject> jserror = Handle<JSObject>::cast(error); |
Handle<Name> key_start_pos = factory->error_start_pos_symbol(); |