Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 028da3d8fc86a62000087050955f817563a74372..f049208ad2c71092d2f8a21afc120974dee29de9 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -645,7 +645,10 @@ void Isolate::ReportFailedAccessCheck(Handle<JSObject> receiver, |
v8::AccessType type) { |
if (!thread_local_top()->failed_access_check_callback_) { |
Handle<String> message = factory()->InternalizeUtf8String("no access"); |
- ScheduleThrow(*factory()->NewTypeError(message)); |
+ Handle<Object> error; |
+ ASSIGN_RETURN_ON_EXCEPTION_VALUE( |
+ this, error, factory()->NewTypeError(message), /* void */); |
+ ScheduleThrow(*error); |
return; |
} |
@@ -862,12 +865,6 @@ Object* Isolate::ThrowIllegalOperation() { |
} |
-Object* Isolate::ThrowInvalidStringLength() { |
- return Throw(*factory()->NewRangeError( |
- "invalid_string_length", HandleVector<Object>(NULL, 0))); |
-} |
- |
- |
void Isolate::ScheduleThrow(Object* exception) { |
// When scheduling a throw we first throw the exception to get the |
// error reporting if it is uncaught before rescheduling it. |
@@ -2361,14 +2358,13 @@ void Isolate::RunMicrotasks() { |
Handle<JSFunction>::cast(microtask); |
SaveContext save(this); |
set_context(microtask_function->context()->native_context()); |
- Handle<Object> exception; |
- MaybeHandle<Object> result = Execution::TryCall( |
- microtask_function, factory()->undefined_value(), |
- 0, NULL, &exception); |
+ MaybeHandle<Object> maybe_exception; |
+ MaybeHandle<Object> result = |
+ Execution::TryCall(microtask_function, factory()->undefined_value(), |
+ 0, NULL, &maybe_exception); |
// If execution is terminating, just bail out. |
- if (result.is_null() && |
- !exception.is_null() && |
- *exception == heap()->termination_exception()) { |
+ Handle<Object> exception; |
+ if (result.is_null() && maybe_exception.is_null()) { |
// Clear out any remaining callbacks in the queue. |
heap()->set_microtask_queue(heap()->empty_fixed_array()); |
set_pending_microtask_count(0); |