| 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 4171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4182 v8::Debug::DebugBreak(env->GetIsolate()); | 4182 v8::Debug::DebugBreak(env->GetIsolate()); |
| 4183 | 4183 |
| 4184 // Call all functions with different argument count. | 4184 // Call all functions with different argument count. |
| 4185 break_point_hit_count = 0; | 4185 break_point_hit_count = 0; |
| 4186 f->Call(env->Global(), 0, NULL); | 4186 f->Call(env->Global(), 0, NULL); |
| 4187 CHECK_EQ(1, break_point_hit_count); | 4187 CHECK_EQ(1, break_point_hit_count); |
| 4188 | 4188 |
| 4189 { | 4189 { |
| 4190 v8::Debug::DebugBreak(env->GetIsolate()); | 4190 v8::Debug::DebugBreak(env->GetIsolate()); |
| 4191 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(env->GetIsolate()); | 4191 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(env->GetIsolate()); |
| 4192 v8::internal::DisableBreak disable_break(isolate, true); | 4192 v8::internal::DisableBreak disable_break(isolate->debug(), true); |
| 4193 f->Call(env->Global(), 0, NULL); | 4193 f->Call(env->Global(), 0, NULL); |
| 4194 CHECK_EQ(1, break_point_hit_count); | 4194 CHECK_EQ(1, break_point_hit_count); |
| 4195 } | 4195 } |
| 4196 | 4196 |
| 4197 f->Call(env->Global(), 0, NULL); | 4197 f->Call(env->Global(), 0, NULL); |
| 4198 CHECK_EQ(2, break_point_hit_count); | 4198 CHECK_EQ(2, break_point_hit_count); |
| 4199 | 4199 |
| 4200 // Get rid of the debug event listener. | 4200 // Get rid of the debug event listener. |
| 4201 v8::Debug::SetDebugEventListener(NULL); | 4201 v8::Debug::SetDebugEventListener(NULL); |
| 4202 CheckDebuggerUnloaded(); | 4202 CheckDebuggerUnloaded(); |
| (...skipping 3215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7418 env->Global()->Set(v8_str("add_debug_break"), add_debug_break); | 7418 env->Global()->Set(v8_str("add_debug_break"), add_debug_break); |
| 7419 | 7419 |
| 7420 CompileRun("(function loop() {" | 7420 CompileRun("(function loop() {" |
| 7421 " for (var j = 0; j < 1000; j++) {" | 7421 " for (var j = 0; j < 1000; j++) {" |
| 7422 " for (var i = 0; i < 1000; i++) {" | 7422 " for (var i = 0; i < 1000; i++) {" |
| 7423 " if (i == 999) add_debug_break();" | 7423 " if (i == 999) add_debug_break();" |
| 7424 " }" | 7424 " }" |
| 7425 " }" | 7425 " }" |
| 7426 "})()"); | 7426 "})()"); |
| 7427 } | 7427 } |
| OLD | NEW |