OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 6851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6862 // Set the debug break flag before calling the code using function.apply. | 6862 // Set the debug break flag before calling the code using function.apply. |
6863 v8::Debug::DebugBreak(); | 6863 v8::Debug::DebugBreak(); |
6864 | 6864 |
6865 // Limit the number of debug breaks. This is a regression test for issue 493 | 6865 // Limit the number of debug breaks. This is a regression test for issue 493 |
6866 // where this test would enter an infinite loop. | 6866 // where this test would enter an infinite loop. |
6867 break_point_hit_count = 0; | 6867 break_point_hit_count = 0; |
6868 max_break_point_hit_count = 10000; // 10000 => infinite loop. | 6868 max_break_point_hit_count = 10000; // 10000 => infinite loop. |
6869 foo->Call(env->Global(), 0, NULL); | 6869 foo->Call(env->Global(), 0, NULL); |
6870 | 6870 |
6871 // When keeping the debug break several break will happen. | 6871 // When keeping the debug break several break will happen. |
6872 CHECK_EQ(3, break_point_hit_count); | 6872 CHECK(break_point_hit_count > 1); |
6873 | 6873 |
6874 v8::Debug::SetDebugEventListener(NULL); | 6874 v8::Debug::SetDebugEventListener(NULL); |
6875 CheckDebuggerUnloaded(); | 6875 CheckDebuggerUnloaded(); |
6876 } | 6876 } |
6877 | 6877 |
6878 | 6878 |
6879 v8::Handle<v8::Context> debugee_context; | 6879 v8::Handle<v8::Context> debugee_context; |
6880 v8::Handle<v8::Context> debugger_context; | 6880 v8::Handle<v8::Context> debugger_context; |
6881 | 6881 |
6882 | 6882 |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7286 TestDebugBreakInLoop("for (;;) {", loop_bodies, "}"); | 7286 TestDebugBreakInLoop("for (;;) {", loop_bodies, "}"); |
7287 TestDebugBreakInLoop("for (;a == 1;) {", loop_bodies, "}"); | 7287 TestDebugBreakInLoop("for (;a == 1;) {", loop_bodies, "}"); |
7288 | 7288 |
7289 // Get rid of the debug event listener. | 7289 // Get rid of the debug event listener. |
7290 v8::Debug::SetDebugEventListener(NULL); | 7290 v8::Debug::SetDebugEventListener(NULL); |
7291 CheckDebuggerUnloaded(); | 7291 CheckDebuggerUnloaded(); |
7292 } | 7292 } |
7293 | 7293 |
7294 | 7294 |
7295 #endif // ENABLE_DEBUGGER_SUPPORT | 7295 #endif // ENABLE_DEBUGGER_SUPPORT |
OLD | NEW |