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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 HeapIterator iterator(CcTest::heap()); | 405 HeapIterator iterator(CcTest::heap()); |
406 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { | 406 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { |
407 CHECK(!obj->IsDebugInfo()); | 407 CHECK(!obj->IsDebugInfo()); |
408 CHECK(!obj->IsBreakPointInfo()); | 408 CHECK(!obj->IsBreakPointInfo()); |
409 | 409 |
410 // If deep check of functions is requested check that no debug break code | 410 // If deep check of functions is requested check that no debug break code |
411 // is left in all functions. | 411 // is left in all functions. |
412 if (check_functions) { | 412 if (check_functions) { |
413 if (obj->IsJSFunction()) { | 413 if (obj->IsJSFunction()) { |
414 JSFunction* fun = JSFunction::cast(obj); | 414 JSFunction* fun = JSFunction::cast(obj); |
415 for (RelocIterator it(fun->shared()->code()); !it.done(); it.next()) { | 415 for (RelocIterator it(fun->shared()->code(), |
416 RelocInfo::Mode rmode = it.rinfo()->rmode(); | 416 RelocInfo::kDebugBreakSlotMask); |
417 if (RelocInfo::IsCodeTarget(rmode)) { | 417 !it.done(); it.next()) { |
418 CHECK(!Debug::IsDebugBreak(it.rinfo()->target_address())); | 418 CHECK(!it.rinfo()->IsPatchedDebugBreakSlotSequence()); |
419 } else if (RelocInfo::IsJSReturn(rmode)) { | |
420 CHECK(!it.rinfo()->IsPatchedReturnSequence()); | |
421 } | |
422 } | 419 } |
423 } | 420 } |
424 } | 421 } |
425 } | 422 } |
426 } | 423 } |
427 | 424 |
428 | 425 |
429 } // namespace internal | 426 } // namespace internal |
430 } // namespace v8 | 427 } // namespace v8 |
431 | 428 |
(...skipping 7143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7575 "let y = 2; \n" | 7572 "let y = 2; \n" |
7576 "debugger; \n" | 7573 "debugger; \n" |
7577 "x * y", | 7574 "x * y", |
7578 30); | 7575 30); |
7579 ExpectInt32( | 7576 ExpectInt32( |
7580 "x = 1; y = 2; \n" | 7577 "x = 1; y = 2; \n" |
7581 "debugger;" | 7578 "debugger;" |
7582 "x * y", | 7579 "x * y", |
7583 30); | 7580 30); |
7584 } | 7581 } |
OLD | NEW |