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

Side by Side Diff: src/isolate.cc

Issue 6347005: [Isolates] Fix memory leaks in Isolate and Logger. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/isolates
Patch Set: Created 9 years, 11 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/log.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 2006-2010 the V8 project authors. All rights reserved. 1 // Copyright 2006-2010 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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 stats_table_ = NULL; 492 stats_table_ = NULL;
493 493
494 delete logger_; 494 delete logger_;
495 logger_ = NULL; 495 logger_ = NULL;
496 496
497 delete counters_; 497 delete counters_;
498 counters_ = NULL; 498 counters_ = NULL;
499 delete cpu_features_; 499 delete cpu_features_;
500 cpu_features_ = NULL; 500 cpu_features_ = NULL;
501 501
502 delete handle_scope_implementer_;
503 handle_scope_implementer_ = NULL;
504 delete break_access_;
505 break_access_ = NULL;
506
502 delete compilation_cache_; 507 delete compilation_cache_;
503 compilation_cache_ = NULL; 508 compilation_cache_ = NULL;
504 delete bootstrapper_; 509 delete bootstrapper_;
505 bootstrapper_ = NULL; 510 bootstrapper_ = NULL;
506 delete pc_to_code_cache_; 511 delete pc_to_code_cache_;
507 pc_to_code_cache_ = NULL; 512 pc_to_code_cache_ = NULL;
508 delete write_input_buffer_; 513 delete write_input_buffer_;
509 write_input_buffer_ = NULL; 514 write_input_buffer_ = NULL;
510 515
511 delete context_switcher_; 516 delete context_switcher_;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 write_input_buffer_ = new StringInputBuffer(); 583 write_input_buffer_ = new StringInputBuffer();
579 global_handles_ = new GlobalHandles(this); 584 global_handles_ = new GlobalHandles(this);
580 bootstrapper_ = new Bootstrapper(); 585 bootstrapper_ = new Bootstrapper();
581 cpu_features_ = new CpuFeatures(); 586 cpu_features_ = new CpuFeatures();
582 handle_scope_implementer_ = new HandleScopeImplementer(); 587 handle_scope_implementer_ = new HandleScopeImplementer();
583 stub_cache_ = new StubCache(this); 588 stub_cache_ = new StubCache(this);
584 ast_sentinels_ = new AstSentinels(); 589 ast_sentinels_ = new AstSentinels();
585 regexp_stack_ = new RegExpStack(); 590 regexp_stack_ = new RegExpStack();
586 regexp_stack_->isolate_ = this; 591 regexp_stack_->isolate_ = this;
587 592
588 #ifdef ENABLE_DEBUGGER_SUPPORT
589 debugger_ = new Debugger();
590 debugger_->isolate_ = this;
591 #endif
592
593 #ifdef ENABLE_LOGGING_AND_PROFILING 593 #ifdef ENABLE_LOGGING_AND_PROFILING
594 producer_heap_profile_ = new ProducerHeapProfile(); 594 producer_heap_profile_ = new ProducerHeapProfile();
595 producer_heap_profile_->isolate_ = this; 595 producer_heap_profile_->isolate_ = this;
596 #endif 596 #endif
597 597
598 state_ = PREINITIALIZED; 598 state_ = PREINITIALIZED;
599 return true; 599 return true;
600 } 600 }
601 601
602 602
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 PerIsolateThreadData* previous_thread_data = item->previous_thread_data; 775 PerIsolateThreadData* previous_thread_data = item->previous_thread_data;
776 Isolate* previous_isolate = item->previous_isolate; 776 Isolate* previous_isolate = item->previous_isolate;
777 777
778 delete item; 778 delete item;
779 779
780 // Reinit the current thread for the isolate it was running before this one. 780 // Reinit the current thread for the isolate it was running before this one.
781 SetIsolateThreadLocals(previous_isolate, previous_thread_data); 781 SetIsolateThreadLocals(previous_isolate, previous_thread_data);
782 } 782 }
783 783
784 } } // namespace v8::internal 784 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698