| Index: src/isolate.h
|
| diff --git a/src/isolate.h b/src/isolate.h
|
| index 6c174da39bd66470aea7962f816533cd5e908d44..1fc089d96062f02aef902ffc92b68bae19643004 100644
|
| --- a/src/isolate.h
|
| +++ b/src/isolate.h
|
| @@ -629,7 +629,8 @@ class Isolate {
|
| thread_local_top_.scheduled_exception_ = heap_.the_hole_value();
|
| }
|
|
|
| - bool IsFinallyOnTop();
|
| + bool IsJavaScriptHandlerOnTop(Object* exception);
|
| + bool IsExternalHandlerOnTop(Object* exception);
|
|
|
| bool is_catchable_by_javascript(Object* exception) {
|
| return exception != heap()->termination_exception();
|
| @@ -743,6 +744,7 @@ class Isolate {
|
| // Exception throwing support. The caller should use the result
|
| // of Throw() as its return value.
|
| Object* Throw(Object* exception, MessageLocation* location = NULL);
|
| + Object* ThrowIllegalOperation();
|
|
|
| template <typename T>
|
| MUST_USE_RESULT MaybeHandle<T> Throw(Handle<Object> exception,
|
| @@ -751,15 +753,20 @@ class Isolate {
|
| return MaybeHandle<T>();
|
| }
|
|
|
| - // Re-throw an exception. This involves no error reporting since
|
| - // error reporting was handled when the exception was thrown
|
| - // originally.
|
| + // Re-throw an exception. This involves no error reporting since error
|
| + // reporting was handled when the exception was thrown originally.
|
| Object* ReThrow(Object* exception);
|
|
|
| // Find the correct handler for the current pending exception. This also
|
| // clears and returns the current pending exception.
|
| Object* FindHandler();
|
|
|
| + // Tries to predict whether the exception will be caught. Note that this can
|
| + // only produce an estimate, because it is undecidable whether a finally
|
| + // clause will consume or re-throw an exception. We conservatively assume any
|
| + // finally clause will behave as if the exception were consumed.
|
| + bool PredictWhetherExceptionIsCaught(Object* exception);
|
| +
|
| void ScheduleThrow(Object* exception);
|
| // Re-set pending message, script and positions reported to the TryCatch
|
| // back to the TLS for re-use when rethrowing.
|
| @@ -769,14 +776,9 @@ class Isolate {
|
| void ReportPendingMessages();
|
| // Return pending location if any or unfilled structure.
|
| MessageLocation GetMessageLocation();
|
| - Object* ThrowIllegalOperation();
|
|
|
| // Promote a scheduled exception to pending. Asserts has_scheduled_exception.
|
| Object* PromoteScheduledException();
|
| - // Checks if exception should be reported and finds out if it's
|
| - // caught externally.
|
| - bool ShouldReportException(bool* can_be_caught_externally,
|
| - bool catchable_by_javascript);
|
|
|
| // Attempts to compute the current source location, storing the
|
| // result in the target out parameter.
|
| @@ -803,7 +805,6 @@ class Isolate {
|
| char* Iterate(ObjectVisitor* v, char* t);
|
| void IterateThread(ThreadVisitor* v, char* t);
|
|
|
| -
|
| // Returns the current native context.
|
| Handle<Context> native_context();
|
|
|
|
|