| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 Code); | 363 Code); |
| 364 } | 364 } |
| 365 | 365 |
| 366 | 366 |
| 367 // Check that the debugger is loaded. | 367 // Check that the debugger is loaded. |
| 368 static void CheckDebuggerLoaded() { | 368 static void CheckDebuggerLoaded() { |
| 369 CHECK(Debug::debug_context().is_null()); | 369 CHECK(Debug::debug_context().is_null()); |
| 370 } | 370 } |
| 371 | 371 |
| 372 | 372 |
| 373 // Check that the debugger has been fully unloaded. | 373 // Check that the debugger has been fully unloaded. |
| 374 static void CheckDebuggerUnloaded(bool check_functions) { | 374 void CheckDebuggerUnloaded(bool check_functions) { |
| 375 // Check that the debugger context is cleared and that there is no debug | 375 // Check that the debugger context is cleared and that there is no debug |
| 376 // information stored for the debugger. | 376 // information stored for the debugger. |
| 377 CHECK(Debug::debug_context().is_null()); | 377 CHECK(Debug::debug_context().is_null()); |
| 378 CHECK_EQ(NULL, Debug::debug_info_list_); | 378 CHECK_EQ(NULL, Debug::debug_info_list_); |
| 379 | 379 |
| 380 // Collect garbage to ensure weak handles are cleared. | 380 // Collect garbage to ensure weak handles are cleared. |
| 381 Heap::CollectAllGarbage(); | 381 Heap::CollectAllGarbage(); |
| 382 Heap::CollectAllGarbage(); | 382 Heap::CollectAllGarbage(); |
| 383 | 383 |
| 384 // Iterate the head and check that there are no debugger related objects left. | 384 // Iterate the head and check that there are no debugger related objects left. |
| (...skipping 3268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3653 // Set break points and run again. | 3653 // Set break points and run again. |
| 3654 SetBreakPoint(foo, 0); | 3654 SetBreakPoint(foo, 0); |
| 3655 SetBreakPoint(foo, 4); | 3655 SetBreakPoint(foo, 4); |
| 3656 foo->Call(env->Global(), 0, NULL); | 3656 foo->Call(env->Global(), 0, NULL); |
| 3657 CHECK_EQ(2, break_point_hit_count); | 3657 CHECK_EQ(2, break_point_hit_count); |
| 3658 | 3658 |
| 3659 // Remove the debug event listener without clearing breakpoints again. | 3659 // Remove the debug event listener without clearing breakpoints again. |
| 3660 v8::Debug::SetDebugEventListener(NULL); | 3660 v8::Debug::SetDebugEventListener(NULL); |
| 3661 CheckDebuggerUnloaded(true); | 3661 CheckDebuggerUnloaded(true); |
| 3662 } | 3662 } |
| OLD | NEW |