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

Side by Side Diff: test/cctest/cctest.h

Issue 421153002: fix StrDup memory leak in CcTest (Closed) Base URL: https://github.com/v8/v8.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | 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 2008 the V8 project authors. All rights reserved. 1 // Copyright 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 using i::Heap::AllocateMap; 91 using i::Heap::AllocateMap;
92 using i::Heap::CopyCode; 92 using i::Heap::CopyCode;
93 }; 93 };
94 94
95 95
96 class CcTest { 96 class CcTest {
97 public: 97 public:
98 typedef void (TestFunction)(); 98 typedef void (TestFunction)();
99 CcTest(TestFunction* callback, const char* file, const char* name, 99 CcTest(TestFunction* callback, const char* file, const char* name,
100 const char* dependency, bool enabled, bool initialize); 100 const char* dependency, bool enabled, bool initialize);
101 ~CcTest() { i::DeleteArray(file_); }
101 void Run(); 102 void Run();
102 static CcTest* last() { return last_; } 103 static CcTest* last() { return last_; }
103 CcTest* prev() { return prev_; } 104 CcTest* prev() { return prev_; }
104 const char* file() { return file_; } 105 const char* file() { return file_; }
105 const char* name() { return name_; } 106 const char* name() { return name_; }
106 const char* dependency() { return dependency_; } 107 const char* dependency() { return dependency_; }
107 bool enabled() { return enabled_; } 108 bool enabled() { return enabled_; }
108 109
109 static v8::Isolate* isolate() { 110 static v8::Isolate* isolate() {
110 CHECK(isolate_ != NULL); 111 CHECK(isolate_ != NULL);
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 CHECK_EQ(0, heap_profiler_->heap_object_map()->FindUntrackedObjects()); 501 CHECK_EQ(0, heap_profiler_->heap_object_map()->FindUntrackedObjects());
501 heap_profiler_->StopHeapObjectsTracking(); 502 heap_profiler_->StopHeapObjectsTracking();
502 } 503 }
503 504
504 private: 505 private:
505 i::HeapProfiler* heap_profiler_; 506 i::HeapProfiler* heap_profiler_;
506 }; 507 };
507 508
508 509
509 #endif // ifndef CCTEST_H_ 510 #endif // ifndef CCTEST_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698