Chromium Code Reviews| Index: src/top.h |
| diff --git a/src/top.h b/src/top.h |
| index c052dad8cee0094d0eea8d9f92cd6d637f21921d..7029dbe1e78760aeadb6b4a212e950b85a666ad5 100644 |
| --- a/src/top.h |
| +++ b/src/top.h |
| @@ -249,12 +249,7 @@ class Top { |
| thread_local_.scheduled_exception_ = Heap::the_hole_value(); |
| } |
| - static void setup_external_caught() { |
| - thread_local_.external_caught_exception_ = |
| - has_pending_exception() && |
| - (thread_local_.catcher_ != NULL) && |
| - (try_catch_handler() == thread_local_.catcher_); |
| - } |
| + static bool IsExternallyCaught(); |
| static void SetCaptureStackTraceForUncaughtExceptions( |
| bool capture, |
| @@ -265,6 +260,12 @@ class Top { |
| // exception. |
| static bool is_out_of_memory(); |
| + static bool is_catchable_by_javascript(MaybeObject* exception) { |
| + return |
|
Mads Ager (chromium)
2011/02/16 09:17:49
Why the extra line? I would probably do:
return (
antonm
2011/02/16 11:40:44
I find it more aesthetically pleasing to have this
|
| + (exception != Failure::OutOfMemoryException()) && |
| + (exception != Heap::termination_exception()); |
| + } |
| + |
| // JS execution stack (see frames.h). |
| static Address c_entry_fp(ThreadLocalTop* thread) { |
| return thread->c_entry_fp_; |
| @@ -397,7 +398,7 @@ class Top { |
| const char* message); |
| // Checks if exception should be reported and finds out if it's |
| // caught externally. |
| - static bool ShouldReportException(bool* is_caught_externally, |
| + static bool ShouldReportException(bool* can_be_caught_externally, |
| bool catchable_by_javascript); |
| // Attempts to compute the current source location, storing the |