Chromium Code Reviews| 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 380 void CheckDebuggerUnloaded(bool check_functions) { | 380 void CheckDebuggerUnloaded(bool check_functions) { |
| 381 // Check that the debugger context is cleared and that there is no debug | 381 // Check that the debugger context is cleared and that there is no debug |
| 382 // information stored for the debugger. | 382 // information stored for the debugger. |
| 383 CHECK(CcTest::i_isolate()->debug()->debug_context().is_null()); | 383 CHECK(CcTest::i_isolate()->debug()->debug_context().is_null()); |
| 384 CHECK(!CcTest::i_isolate()->debug()->debug_info_list_); | 384 CHECK(!CcTest::i_isolate()->debug()->debug_info_list_); |
| 385 | 385 |
| 386 // Collect garbage to ensure weak handles are cleared. | 386 // Collect garbage to ensure weak handles are cleared. |
| 387 CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); | 387 CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); |
| 388 CcTest::CollectAllGarbage(Heap::kMakeHeapIterableMask); | 388 CcTest::CollectAllGarbage(Heap::kMakeHeapIterableMask); |
| 389 | 389 |
| 390 // Iterate the head and check that there are no debugger related objects left. | 390 // Iterate the head and check that there are no debugger related objects left. |
|
Michael Starzinger
2017/04/13 11:25:59
nit: s/head/heap/
Yang
2017/04/13 11:53:34
Done.
| |
| 391 HeapIterator iterator(CcTest::heap()); | 391 HeapIterator iterator(CcTest::heap()); |
| 392 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { | 392 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { |
| 393 CHECK(!obj->IsDebugInfo()); | 393 CHECK(!obj->IsDebugInfo()); |
| 394 CHECK(!obj->IsBreakPointInfo()); | |
| 395 | 394 |
| 396 // If deep check of functions is requested check that no debug break code | 395 // If deep check of functions is requested check that no debug break code |
| 397 // is left in all functions. | 396 // is left in all functions. |
| 398 if (check_functions) { | 397 if (check_functions) { |
| 399 if (obj->IsJSFunction()) { | 398 if (obj->IsJSFunction()) { |
| 400 JSFunction* fun = JSFunction::cast(obj); | 399 JSFunction* fun = JSFunction::cast(obj); |
| 401 for (RelocIterator it(fun->shared()->code(), | 400 for (RelocIterator it(fun->shared()->code(), |
| 402 RelocInfo::kDebugBreakSlotMask); | 401 RelocInfo::kDebugBreakSlotMask); |
| 403 !it.done(); it.next()) { | 402 !it.done(); it.next()) { |
| 404 CHECK(!it.rinfo()->IsPatchedDebugBreakSlotSequence()); | 403 CHECK(!it.rinfo()->IsPatchedDebugBreakSlotSequence()); |
| (...skipping 6301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6706 } | 6705 } |
| 6707 if (i::FLAG_turbo) { | 6706 if (i::FLAG_turbo) { |
| 6708 // With turbofan we generate one return location per return statement, | 6707 // With turbofan we generate one return location per return statement, |
| 6709 // each has line = 5, column = 0 as statement position. | 6708 // each has line = 5, column = 0 as statement position. |
| 6710 CHECK(returns_count == 4); | 6709 CHECK(returns_count == 4); |
| 6711 } else { | 6710 } else { |
| 6712 // Without turbofan we generate one return location. | 6711 // Without turbofan we generate one return location. |
| 6713 CHECK(returns_count == 1); | 6712 CHECK(returns_count == 1); |
| 6714 } | 6713 } |
| 6715 } | 6714 } |
| OLD | NEW |