Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index a07d656d75f923dd94c891a0d5d1fe53244ca789..d823f5836631cc76b7d4dbaf0911a94c6ecc4fc7 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -1195,7 +1195,9 @@ MaybeHandle<Object> Factory::NewError(const char* maker, const char* message, |
arraysize(argv), |
argv, |
&exception).ToHandle(&result)) { |
- return exception; |
+ Handle<Object> exception_obj; |
+ if (exception.ToHandle(&exception_obj)) return exception_obj; |
+ return undefined_value(); |
} |
return result; |
} |
@@ -1222,7 +1224,9 @@ MaybeHandle<Object> Factory::NewError(const char* constructor, |
arraysize(argv), |
argv, |
&exception).ToHandle(&result)) { |
- return exception; |
+ Handle<Object> exception_obj; |
+ if (exception.ToHandle(&exception_obj)) return exception_obj; |
+ return undefined_value(); |
} |
return result; |
} |