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

Side by Side Diff: src/api.h

Issue 7624043: Fix three ~Isolate() related memory leaks (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 4 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 | « no previous file | src/isolate.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 class HandleScopeImplementer { 399 class HandleScopeImplementer {
400 public: 400 public:
401 explicit HandleScopeImplementer(Isolate* isolate) 401 explicit HandleScopeImplementer(Isolate* isolate)
402 : isolate_(isolate), 402 : isolate_(isolate),
403 blocks_(0), 403 blocks_(0),
404 entered_contexts_(0), 404 entered_contexts_(0),
405 saved_contexts_(0), 405 saved_contexts_(0),
406 spare_(NULL), 406 spare_(NULL),
407 call_depth_(0) { } 407 call_depth_(0) { }
408 408
409 ~HandleScopeImplementer() {
410 DeleteArray(spare_);
411 }
412
409 // Threading support for handle data. 413 // Threading support for handle data.
410 static int ArchiveSpacePerThread(); 414 static int ArchiveSpacePerThread();
411 char* RestoreThread(char* from); 415 char* RestoreThread(char* from);
412 char* ArchiveThread(char* to); 416 char* ArchiveThread(char* to);
413 void FreeThreadResources(); 417 void FreeThreadResources();
414 418
415 // Garbage collection support. 419 // Garbage collection support.
416 void Iterate(v8::internal::ObjectVisitor* v); 420 void Iterate(v8::internal::ObjectVisitor* v);
417 static char* Iterate(v8::internal::ObjectVisitor* v, char* data); 421 static char* Iterate(v8::internal::ObjectVisitor* v, char* data);
418 422
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 stress_type_ = stress_type; 561 stress_type_ = stress_type;
558 } 562 }
559 563
560 private: 564 private:
561 static v8::Testing::StressType stress_type_; 565 static v8::Testing::StressType stress_type_;
562 }; 566 };
563 567
564 } } // namespace v8::internal 568 } } // namespace v8::internal
565 569
566 #endif // V8_API_H_ 570 #endif // V8_API_H_
OLDNEW
« no previous file with comments | « no previous file | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698