| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
| (...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 bool report_exception = catchable_by_javascript && should_report_exception; | 1019 bool report_exception = catchable_by_javascript && should_report_exception; |
| 1020 bool try_catch_needs_message = | 1020 bool try_catch_needs_message = |
| 1021 can_be_caught_externally && try_catch_handler()->capture_message_ && | 1021 can_be_caught_externally && try_catch_handler()->capture_message_ && |
| 1022 !thread_local_top()->rethrowing_message_; | 1022 !thread_local_top()->rethrowing_message_; |
| 1023 bool bootstrapping = bootstrapper()->IsActive(); | 1023 bool bootstrapping = bootstrapper()->IsActive(); |
| 1024 | 1024 |
| 1025 thread_local_top()->rethrowing_message_ = false; | 1025 thread_local_top()->rethrowing_message_ = false; |
| 1026 | 1026 |
| 1027 // Notify debugger of exception. | 1027 // Notify debugger of exception. |
| 1028 if (catchable_by_javascript) { | 1028 if (catchable_by_javascript) { |
| 1029 debug()->OnException(exception_handle, report_exception); | 1029 debug()->OnThrow(exception_handle, report_exception); |
| 1030 } | 1030 } |
| 1031 | 1031 |
| 1032 // Generate the message if required. | 1032 // Generate the message if required. |
| 1033 if (report_exception || try_catch_needs_message) { | 1033 if (report_exception || try_catch_needs_message) { |
| 1034 MessageLocation potential_computed_location; | 1034 MessageLocation potential_computed_location; |
| 1035 if (location == NULL) { | 1035 if (location == NULL) { |
| 1036 // If no location was specified we use a computed one instead. | 1036 // If no location was specified we use a computed one instead. |
| 1037 ComputeLocation(&potential_computed_location); | 1037 ComputeLocation(&potential_computed_location); |
| 1038 location = &potential_computed_location; | 1038 location = &potential_computed_location; |
| 1039 } | 1039 } |
| (...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2366 if (prev_ && prev_->Intercept(flag)) return true; | 2366 if (prev_ && prev_->Intercept(flag)) return true; |
| 2367 // Then check whether this scope intercepts. | 2367 // Then check whether this scope intercepts. |
| 2368 if ((flag & intercept_mask_)) { | 2368 if ((flag & intercept_mask_)) { |
| 2369 intercepted_flags_ |= flag; | 2369 intercepted_flags_ |= flag; |
| 2370 return true; | 2370 return true; |
| 2371 } | 2371 } |
| 2372 return false; | 2372 return false; |
| 2373 } | 2373 } |
| 2374 | 2374 |
| 2375 } } // namespace v8::internal | 2375 } } // namespace v8::internal |
| OLD | NEW |