| 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 // information stored for the debugger. | 422 // information stored for the debugger. |
| 423 CHECK(Isolate::Current()->debug()->debug_context().is_null()); | 423 CHECK(Isolate::Current()->debug()->debug_context().is_null()); |
| 424 CHECK_EQ(NULL, Isolate::Current()->debug()->debug_info_list_); | 424 CHECK_EQ(NULL, Isolate::Current()->debug()->debug_info_list_); |
| 425 | 425 |
| 426 // Collect garbage to ensure weak handles are cleared. | 426 // Collect garbage to ensure weak handles are cleared. |
| 427 HEAP->CollectAllGarbage(i::Heap::kNoGCFlags); | 427 HEAP->CollectAllGarbage(i::Heap::kNoGCFlags); |
| 428 HEAP->CollectAllGarbage(i::Heap::kMakeHeapIterableMask); | 428 HEAP->CollectAllGarbage(i::Heap::kMakeHeapIterableMask); |
| 429 | 429 |
| 430 // Iterate the head and check that there are no debugger related objects left. | 430 // Iterate the head and check that there are no debugger related objects left. |
| 431 HeapIterator iterator; | 431 HeapIterator iterator; |
| 432 for (HeapObject* obj = iterator.Next(); obj != NULL; obj = iterator.Next()) { | 432 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { |
| 433 CHECK(!obj->IsDebugInfo()); | 433 CHECK(!obj->IsDebugInfo()); |
| 434 CHECK(!obj->IsBreakPointInfo()); | 434 CHECK(!obj->IsBreakPointInfo()); |
| 435 | 435 |
| 436 // If deep check of functions is requested check that no debug break code | 436 // If deep check of functions is requested check that no debug break code |
| 437 // is left in all functions. | 437 // is left in all functions. |
| 438 if (check_functions) { | 438 if (check_functions) { |
| 439 if (obj->IsJSFunction()) { | 439 if (obj->IsJSFunction()) { |
| 440 JSFunction* fun = JSFunction::cast(obj); | 440 JSFunction* fun = JSFunction::cast(obj); |
| 441 for (RelocIterator it(fun->shared()->code()); !it.done(); it.next()) { | 441 for (RelocIterator it(fun->shared()->code()); !it.done(); it.next()) { |
| 442 RelocInfo::Mode rmode = it.rinfo()->rmode(); | 442 RelocInfo::Mode rmode = it.rinfo()->rmode(); |
| (...skipping 6852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7295 TestDebugBreakInLoop("for (;;) {", loop_bodies, "}"); | 7295 TestDebugBreakInLoop("for (;;) {", loop_bodies, "}"); |
| 7296 TestDebugBreakInLoop("for (;a == 1;) {", loop_bodies, "}"); | 7296 TestDebugBreakInLoop("for (;a == 1;) {", loop_bodies, "}"); |
| 7297 | 7297 |
| 7298 // Get rid of the debug event listener. | 7298 // Get rid of the debug event listener. |
| 7299 v8::Debug::SetDebugEventListener(NULL); | 7299 v8::Debug::SetDebugEventListener(NULL); |
| 7300 CheckDebuggerUnloaded(); | 7300 CheckDebuggerUnloaded(); |
| 7301 } | 7301 } |
| 7302 | 7302 |
| 7303 | 7303 |
| 7304 #endif // ENABLE_DEBUGGER_SUPPORT | 7304 #endif // ENABLE_DEBUGGER_SUPPORT |
| OLD | NEW |