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

Side by Side Diff: src/handles-inl.h

Issue 12989019: Put zapping of local handles behind the extra checks flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Jakob Kummerow. Created 7 years, 9 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 | « src/handles.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 void HandleScope::CloseScope() { 101 void HandleScope::CloseScope() {
102 v8::ImplementationUtilities::HandleScopeData* current = 102 v8::ImplementationUtilities::HandleScopeData* current =
103 isolate_->handle_scope_data(); 103 isolate_->handle_scope_data();
104 current->next = prev_next_; 104 current->next = prev_next_;
105 current->level--; 105 current->level--;
106 if (current->limit != prev_limit_) { 106 if (current->limit != prev_limit_) {
107 current->limit = prev_limit_; 107 current->limit = prev_limit_;
108 DeleteExtensions(isolate_); 108 DeleteExtensions(isolate_);
109 } 109 }
110 #ifdef DEBUG 110 #ifdef ENABLE_EXTRA_CHECKS
111 ZapRange(prev_next_, prev_limit_); 111 ZapRange(prev_next_, prev_limit_);
112 #endif 112 #endif
113 } 113 }
114 114
115 115
116 template <typename T> 116 template <typename T>
117 Handle<T> HandleScope::CloseAndEscape(Handle<T> handle_value) { 117 Handle<T> HandleScope::CloseAndEscape(Handle<T> handle_value) {
118 T* value = *handle_value; 118 T* value = *handle_value;
119 // Throw away all handles in the current scope. 119 // Throw away all handles in the current scope.
120 CloseScope(); 120 CloseScope();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 HandleDereferenceGuard::~HandleDereferenceGuard() { 190 HandleDereferenceGuard::~HandleDereferenceGuard() {
191 isolate_->SetAllowHandleDereference(old_state_); 191 isolate_->SetAllowHandleDereference(old_state_);
192 } 192 }
193 193
194 #endif 194 #endif
195 195
196 } } // namespace v8::internal 196 } } // namespace v8::internal
197 197
198 #endif // V8_HANDLES_INL_H_ 198 #endif // V8_HANDLES_INL_H_
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698