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 "src/isolate.h" | 5 #include "src/isolate.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
987 bool requires_message = try_catch_handler() == nullptr || | 987 bool requires_message = try_catch_handler() == nullptr || |
988 try_catch_handler()->is_verbose_ || | 988 try_catch_handler()->is_verbose_ || |
989 try_catch_handler()->capture_message_; | 989 try_catch_handler()->capture_message_; |
990 bool rethrowing_message = thread_local_top()->rethrowing_message_; | 990 bool rethrowing_message = thread_local_top()->rethrowing_message_; |
991 | 991 |
992 thread_local_top()->rethrowing_message_ = false; | 992 thread_local_top()->rethrowing_message_ = false; |
993 | 993 |
994 // Notify debugger of exception. | 994 // Notify debugger of exception. |
995 if (is_catchable_by_javascript(exception)) { | 995 if (is_catchable_by_javascript(exception)) { |
996 debug()->OnThrow(exception_handle); | 996 debug()->OnThrow(exception_handle); |
997 this->counters()->exceptions_thrown()->Increment(); | |
Yang
2015/10/23 04:53:20
You can omit "this->"
Putting the counter increme
| |
997 } | 998 } |
998 | 999 |
999 // Generate the message if required. | 1000 // Generate the message if required. |
1000 if (requires_message && !rethrowing_message) { | 1001 if (requires_message && !rethrowing_message) { |
1001 MessageLocation computed_location; | 1002 MessageLocation computed_location; |
1002 // If no location was specified we try to use a computed one instead. | 1003 // If no location was specified we try to use a computed one instead. |
1003 if (location == NULL && ComputeLocation(&computed_location)) { | 1004 if (location == NULL && ComputeLocation(&computed_location)) { |
1004 location = &computed_location; | 1005 location = &computed_location; |
1005 } | 1006 } |
1006 | 1007 |
(...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2843 // Then check whether this scope intercepts. | 2844 // Then check whether this scope intercepts. |
2844 if ((flag & intercept_mask_)) { | 2845 if ((flag & intercept_mask_)) { |
2845 intercepted_flags_ |= flag; | 2846 intercepted_flags_ |= flag; |
2846 return true; | 2847 return true; |
2847 } | 2848 } |
2848 return false; | 2849 return false; |
2849 } | 2850 } |
2850 | 2851 |
2851 } // namespace internal | 2852 } // namespace internal |
2852 } // namespace v8 | 2853 } // namespace v8 |
OLD | NEW |