OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 | 983 |
984 // Stack allocated class for disabling break. | 984 // Stack allocated class for disabling break. |
985 class DisableBreak BASE_EMBEDDED { | 985 class DisableBreak BASE_EMBEDDED { |
986 public: | 986 public: |
987 explicit DisableBreak(Isolate* isolate, bool disable_break) | 987 explicit DisableBreak(Isolate* isolate, bool disable_break) |
988 : isolate_(isolate) { | 988 : isolate_(isolate) { |
989 prev_disable_break_ = isolate_->debug()->disable_break(); | 989 prev_disable_break_ = isolate_->debug()->disable_break(); |
990 isolate_->debug()->set_disable_break(disable_break); | 990 isolate_->debug()->set_disable_break(disable_break); |
991 } | 991 } |
992 ~DisableBreak() { | 992 ~DisableBreak() { |
993 ASSERT(Isolate::Current() == isolate_); | |
994 isolate_->debug()->set_disable_break(prev_disable_break_); | 993 isolate_->debug()->set_disable_break(prev_disable_break_); |
995 } | 994 } |
996 | 995 |
997 private: | 996 private: |
998 Isolate* isolate_; | 997 Isolate* isolate_; |
999 // The previous state of the disable break used to restore the value when this | 998 // The previous state of the disable break used to restore the value when this |
1000 // object is destructed. | 999 // object is destructed. |
1001 bool prev_disable_break_; | 1000 bool prev_disable_break_; |
1002 }; | 1001 }; |
1003 | 1002 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 | 1062 |
1064 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); | 1063 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); |
1065 }; | 1064 }; |
1066 | 1065 |
1067 | 1066 |
1068 } } // namespace v8::internal | 1067 } } // namespace v8::internal |
1069 | 1068 |
1070 #endif // ENABLE_DEBUGGER_SUPPORT | 1069 #endif // ENABLE_DEBUGGER_SUPPORT |
1071 | 1070 |
1072 #endif // V8_DEBUG_H_ | 1071 #endif // V8_DEBUG_H_ |
OLD | NEW |