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

Side by Side Diff: src/handles.h

Issue 1185633002: Additional HandleScopes to limit Handle consumption. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Refine comment. Created 5 years, 6 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
« no previous file with comments | « src/ast.cc ('k') | src/handles-inl.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 #ifndef V8_HANDLES_H_ 5 #ifndef V8_HANDLES_H_
6 #define V8_HANDLES_H_ 6 #define V8_HANDLES_H_
7 7
8 #include "src/objects.h" 8 #include "src/objects.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 // Closes the HandleScope (invalidating all handles 202 // Closes the HandleScope (invalidating all handles
203 // created in the scope of the HandleScope) and returns 203 // created in the scope of the HandleScope) and returns
204 // a Handle backed by the parent scope holding the 204 // a Handle backed by the parent scope holding the
205 // value of the argument handle. 205 // value of the argument handle.
206 template <typename T> 206 template <typename T>
207 Handle<T> CloseAndEscape(Handle<T> handle_value); 207 Handle<T> CloseAndEscape(Handle<T> handle_value);
208 208
209 Isolate* isolate() { return isolate_; } 209 Isolate* isolate() { return isolate_; }
210 210
211 static const int kCheckHandleThreshold = 16 * 1024;
212
211 private: 213 private:
212 // Prevent heap allocation or illegal handle scopes. 214 // Prevent heap allocation or illegal handle scopes.
213 HandleScope(const HandleScope&); 215 HandleScope(const HandleScope&);
214 void operator=(const HandleScope&); 216 void operator=(const HandleScope&);
215 void* operator new(size_t size); 217 void* operator new(size_t size);
216 void operator delete(void* size_t); 218 void operator delete(void* size_t);
217 219
218 Isolate* isolate_; 220 Isolate* isolate_;
219 Object** prev_next_; 221 Object** prev_next_;
220 Object** prev_limit_; 222 Object** prev_limit_;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 291
290 void Initialize() { 292 void Initialize() {
291 next = limit = NULL; 293 next = limit = NULL;
292 level = 0; 294 level = 0;
293 } 295 }
294 }; 296 };
295 297
296 } } // namespace v8::internal 298 } } // namespace v8::internal
297 299
298 #endif // V8_HANDLES_H_ 300 #endif // V8_HANDLES_H_
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/handles-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698