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

Side by Side Diff: src/api.cc

Issue 769263002: Add support for enabling DCHECKs in release mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 6 years 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
« no previous file with comments | « no previous file | src/arm/codegen-arm.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 7549 matching lines...) Expand 10 before | Expand all | Expand 10 after
7560 7560
7561 7561
7562 char* HandleScopeImplementer::RestoreThread(char* storage) { 7562 char* HandleScopeImplementer::RestoreThread(char* storage) {
7563 MemCopy(this, storage, sizeof(*this)); 7563 MemCopy(this, storage, sizeof(*this));
7564 *isolate_->handle_scope_data() = handle_scope_data_; 7564 *isolate_->handle_scope_data() = handle_scope_data_;
7565 return storage + ArchiveSpacePerThread(); 7565 return storage + ArchiveSpacePerThread();
7566 } 7566 }
7567 7567
7568 7568
7569 void HandleScopeImplementer::IterateThis(ObjectVisitor* v) { 7569 void HandleScopeImplementer::IterateThis(ObjectVisitor* v) {
7570 #ifdef DEBUG 7570 #if DCHECK_IS_ON
7571 bool found_block_before_deferred = false; 7571 bool found_block_before_deferred = false;
7572 #endif 7572 #endif
7573 // Iterate over all handles in the blocks except for the last. 7573 // Iterate over all handles in the blocks except for the last.
7574 for (int i = blocks()->length() - 2; i >= 0; --i) { 7574 for (int i = blocks()->length() - 2; i >= 0; --i) {
7575 Object** block = blocks()->at(i); 7575 Object** block = blocks()->at(i);
7576 if (last_handle_before_deferred_block_ != NULL && 7576 if (last_handle_before_deferred_block_ != NULL &&
7577 (last_handle_before_deferred_block_ <= &block[kHandleBlockSize]) && 7577 (last_handle_before_deferred_block_ <= &block[kHandleBlockSize]) &&
7578 (last_handle_before_deferred_block_ >= block)) { 7578 (last_handle_before_deferred_block_ >= block)) {
7579 v->VisitPointers(block, last_handle_before_deferred_block_); 7579 v->VisitPointers(block, last_handle_before_deferred_block_);
7580 DCHECK(!found_block_before_deferred); 7580 DCHECK(!found_block_before_deferred);
7581 #ifdef DEBUG 7581 #if DCHECK_IS_ON
7582 found_block_before_deferred = true; 7582 found_block_before_deferred = true;
7583 #endif 7583 #endif
7584 } else { 7584 } else {
7585 v->VisitPointers(block, &block[kHandleBlockSize]); 7585 v->VisitPointers(block, &block[kHandleBlockSize]);
7586 } 7586 }
7587 } 7587 }
7588 7588
7589 DCHECK(last_handle_before_deferred_block_ == NULL || 7589 DCHECK(last_handle_before_deferred_block_ == NULL ||
7590 found_block_before_deferred); 7590 found_block_before_deferred);
7591 7591
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
7697 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7697 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7698 Address callback_address = 7698 Address callback_address =
7699 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7699 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7700 VMState<EXTERNAL> state(isolate); 7700 VMState<EXTERNAL> state(isolate);
7701 ExternalCallbackScope call_scope(isolate, callback_address); 7701 ExternalCallbackScope call_scope(isolate, callback_address);
7702 callback(info); 7702 callback(info);
7703 } 7703 }
7704 7704
7705 7705
7706 } } // namespace v8::internal 7706 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm/codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698