Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Side by Side Diff: src/api.h

Issue 25250002: Split extra checks into extra checks and handle zapping (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/features.gypi ('k') | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 } 660 }
661 661
662 662
663 void HandleScopeImplementer::DeleteExtensions(internal::Object** prev_limit) { 663 void HandleScopeImplementer::DeleteExtensions(internal::Object** prev_limit) {
664 while (!blocks_.is_empty()) { 664 while (!blocks_.is_empty()) {
665 internal::Object** block_start = blocks_.last(); 665 internal::Object** block_start = blocks_.last();
666 internal::Object** block_limit = block_start + kHandleBlockSize; 666 internal::Object** block_limit = block_start + kHandleBlockSize;
667 #ifdef DEBUG 667 #ifdef DEBUG
668 // SealHandleScope may make the prev_limit to point inside the block. 668 // SealHandleScope may make the prev_limit to point inside the block.
669 if (block_start <= prev_limit && prev_limit <= block_limit) { 669 if (block_start <= prev_limit && prev_limit <= block_limit) {
670 #ifdef ENABLE_EXTRA_CHECKS 670 #ifdef ENABLE_HANDLE_ZAPPING
671 internal::HandleScope::ZapRange(prev_limit, block_limit); 671 internal::HandleScope::ZapRange(prev_limit, block_limit);
672 #endif 672 #endif
673 break; 673 break;
674 } 674 }
675 #else 675 #else
676 if (prev_limit == block_limit) break; 676 if (prev_limit == block_limit) break;
677 #endif 677 #endif
678 678
679 blocks_.RemoveLast(); 679 blocks_.RemoveLast();
680 #ifdef ENABLE_EXTRA_CHECKS 680 #ifdef ENABLE_HANDLE_ZAPPING
681 internal::HandleScope::ZapRange(block_start, block_limit); 681 internal::HandleScope::ZapRange(block_start, block_limit);
682 #endif 682 #endif
683 if (spare_ != NULL) { 683 if (spare_ != NULL) {
684 DeleteArray(spare_); 684 DeleteArray(spare_);
685 } 685 }
686 spare_ = block_start; 686 spare_ = block_start;
687 } 687 }
688 ASSERT((blocks_.is_empty() && prev_limit == NULL) || 688 ASSERT((blocks_.is_empty() && prev_limit == NULL) ||
689 (!blocks_.is_empty() && prev_limit != NULL)); 689 (!blocks_.is_empty() && prev_limit != NULL));
690 } 690 }
(...skipping 16 matching lines...) Expand all
707 stress_type_ = stress_type; 707 stress_type_ = stress_type;
708 } 708 }
709 709
710 private: 710 private:
711 static v8::Testing::StressType stress_type_; 711 static v8::Testing::StressType stress_type_;
712 }; 712 };
713 713
714 } } // namespace v8::internal 714 } } // namespace v8::internal
715 715
716 #endif // V8_API_H_ 716 #endif // V8_API_H_
OLDNEW
« no previous file with comments | « build/features.gypi ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698