| 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 return block; | 630 return block; |
| 631 } | 631 } |
| 632 | 632 |
| 633 | 633 |
| 634 void HandleScopeImplementer::DeleteExtensions(internal::Object** prev_limit) { | 634 void HandleScopeImplementer::DeleteExtensions(internal::Object** prev_limit) { |
| 635 while (!blocks_.is_empty()) { | 635 while (!blocks_.is_empty()) { |
| 636 internal::Object** block_start = blocks_.last(); | 636 internal::Object** block_start = blocks_.last(); |
| 637 internal::Object** block_limit = block_start + kHandleBlockSize; | 637 internal::Object** block_limit = block_start + kHandleBlockSize; |
| 638 #ifdef DEBUG | 638 #ifdef DEBUG |
| 639 // NoHandleAllocation may make the prev_limit to point inside the block. | 639 // NoHandleAllocation may make the prev_limit to point inside the block. |
| 640 if (block_start <= prev_limit && prev_limit <= block_limit) break; | 640 if (block_start <= prev_limit && prev_limit <= block_limit) { |
| 641 #ifdef ENABLE_EXTRA_CHECKS |
| 642 internal::HandleScope::ZapRange(prev_limit, block_limit); |
| 643 #endif |
| 644 break; |
| 645 } |
| 641 #else | 646 #else |
| 642 if (prev_limit == block_limit) break; | 647 if (prev_limit == block_limit) break; |
| 643 #endif | 648 #endif |
| 644 | 649 |
| 645 blocks_.RemoveLast(); | 650 blocks_.RemoveLast(); |
| 646 #ifdef ENABLE_EXTRA_CHECKS | 651 #ifdef ENABLE_EXTRA_CHECKS |
| 647 internal::HandleScope::ZapRange(block_start, block_limit); | 652 internal::HandleScope::ZapRange(block_start, block_limit); |
| 648 #endif | 653 #endif |
| 649 if (spare_ != NULL) { | 654 if (spare_ != NULL) { |
| 650 DeleteArray(spare_); | 655 DeleteArray(spare_); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 663 stress_type_ = stress_type; | 668 stress_type_ = stress_type; |
| 664 } | 669 } |
| 665 | 670 |
| 666 private: | 671 private: |
| 667 static v8::Testing::StressType stress_type_; | 672 static v8::Testing::StressType stress_type_; |
| 668 }; | 673 }; |
| 669 | 674 |
| 670 } } // namespace v8::internal | 675 } } // namespace v8::internal |
| 671 | 676 |
| 672 #endif // V8_API_H_ | 677 #endif // V8_API_H_ |
| OLD | NEW |