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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 spare_ = NULL; | 629 spare_ = NULL; |
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 // RequireNewHandleScope may make the prev_limit to point inside the block. |
640 if (block_start <= prev_limit && prev_limit <= block_limit) { | 640 if (block_start <= prev_limit && prev_limit <= block_limit) { |
641 #ifdef ENABLE_EXTRA_CHECKS | 641 #ifdef ENABLE_EXTRA_CHECKS |
642 internal::HandleScope::ZapRange(prev_limit, block_limit); | 642 internal::HandleScope::ZapRange(prev_limit, block_limit); |
643 #endif | 643 #endif |
644 break; | 644 break; |
645 } | 645 } |
646 #else | 646 #else |
647 if (prev_limit == block_limit) break; | 647 if (prev_limit == block_limit) break; |
648 #endif | 648 #endif |
649 | 649 |
(...skipping 18 matching lines...) Expand all Loading... |
668 stress_type_ = stress_type; | 668 stress_type_ = stress_type; |
669 } | 669 } |
670 | 670 |
671 private: | 671 private: |
672 static v8::Testing::StressType stress_type_; | 672 static v8::Testing::StressType stress_type_; |
673 }; | 673 }; |
674 | 674 |
675 } } // namespace v8::internal | 675 } } // namespace v8::internal |
676 | 676 |
677 #endif // V8_API_H_ | 677 #endif // V8_API_H_ |
OLD | NEW |