Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index c7eb173981c0e2d7e986d456754be9633a883875..20d148e2850e1dc82abc55326967271a15482d35 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -264,21 +264,11 @@ void Isolate::IterateThread(ThreadVisitor* v, char* t) { |
void Isolate::Iterate(ObjectVisitor* v, ThreadLocalTop* thread) { |
// Visit the roots from the top for a given thread. |
- Object* pending; |
- // The pending exception can sometimes be a failure. We can't show |
- // that to the GC, which only understands objects. |
- if (thread->pending_exception_->ToObject(&pending)) { |
- v->VisitPointer(&pending); |
- thread->pending_exception_ = pending; // In case GC updated it. |
- } |
+ v->VisitPointer(&thread->pending_exception_); |
v->VisitPointer(&(thread->pending_message_obj_)); |
v->VisitPointer(BitCast<Object**>(&(thread->pending_message_script_))); |
v->VisitPointer(BitCast<Object**>(&(thread->context_))); |
- Object* scheduled; |
- if (thread->scheduled_exception_->ToObject(&scheduled)) { |
- v->VisitPointer(&scheduled); |
- thread->scheduled_exception_ = scheduled; |
- } |
+ v->VisitPointer(&thread->scheduled_exception_); |
for (v8::TryCatch* block = thread->TryCatchHandler(); |
block != NULL; |
@@ -912,7 +902,7 @@ Failure* Isolate::Throw(Object* exception, MessageLocation* location) { |
} |
-Failure* Isolate::ReThrow(MaybeObject* exception) { |
+Failure* Isolate::ReThrow(Object* exception) { |
bool can_be_caught_externally = false; |
bool catchable_by_javascript = is_catchable_by_javascript(exception); |
ShouldReportException(&can_be_caught_externally, catchable_by_javascript); |
@@ -969,7 +959,7 @@ void Isolate::RestorePendingMessageFromTryCatch(v8::TryCatch* handler) { |
Failure* Isolate::PromoteScheduledException() { |
- MaybeObject* thrown = scheduled_exception(); |
+ Object* thrown = scheduled_exception(); |
clear_scheduled_exception(); |
// Re-throw the exception to avoid getting repeated error reporting. |
return ReThrow(thrown); |
@@ -1813,9 +1803,6 @@ void Isolate::PropagatePendingExceptionToExternalTryCatch() { |
try_catch_handler()->exception_ = heap()->null_value(); |
} else { |
v8::TryCatch* handler = try_catch_handler(); |
- // At this point all non-object (failure) exceptions have |
- // been dealt with so this shouldn't fail. |
- ASSERT(!pending_exception()->IsFailure()); |
ASSERT(thread_local_top_.pending_message_obj_->IsJSMessageObject() || |
thread_local_top_.pending_message_obj_->IsTheHole()); |
ASSERT(thread_local_top_.pending_message_script_->IsScript() || |