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

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

Issue 1064713005: collect phantom handle data before it gets overwritten (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | src/global-handles.cc » ('j') | src/global-handles.cc » ('J')
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_GLOBAL_HANDLES_H_ 5 #ifndef V8_GLOBAL_HANDLES_H_
6 #define V8_GLOBAL_HANDLES_H_ 6 #define V8_GLOBAL_HANDLES_H_
7 7
8 #include "include/v8.h" 8 #include "include/v8.h"
9 #include "include/v8-profiler.h" 9 #include "include/v8-profiler.h"
10 10
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 // Returns the current number of weak handles to global objects. 156 // Returns the current number of weak handles to global objects.
157 // These handles are also included in NumberOfWeakHandles(). 157 // These handles are also included in NumberOfWeakHandles().
158 int NumberOfGlobalObjectWeakHandles(); 158 int NumberOfGlobalObjectWeakHandles();
159 159
160 // Returns the current number of handles to global objects. 160 // Returns the current number of handles to global objects.
161 int global_handles_count() const { 161 int global_handles_count() const {
162 return number_of_global_handles_; 162 return number_of_global_handles_;
163 } 163 }
164 164
165 // Collect up data for the weak handle callbacks after GC has completed, but
166 // before memory is reclaimed.
167 void CollectAllPhantomCallbackData();
168
169 // Collect up data for the weak handle callbacks referenced by young
170 // generation after GC has completed, but before memory is reclaimed.
171 void CollectYoungPhantomCallbackData();
172
173 // Clear the weakness of a global handle. 165 // Clear the weakness of a global handle.
174 static void* ClearWeakness(Object** location); 166 static void* ClearWeakness(Object** location);
175 167
176 // Clear the weakness of a global handle. 168 // Clear the weakness of a global handle.
177 static void MarkIndependent(Object** location); 169 static void MarkIndependent(Object** location);
178 170
179 // Mark the reference to this object externaly unreachable. 171 // Mark the reference to this object externaly unreachable.
180 static void MarkPartiallyDependent(Object** location); 172 static void MarkPartiallyDependent(Object** location);
181 173
182 static bool IsIndependent(Object** location); 174 static bool IsIndependent(Object** location);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 List<int> new_space_indices_; 429 List<int> new_space_indices_;
438 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; 430 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES];
439 431
440 DISALLOW_COPY_AND_ASSIGN(EternalHandles); 432 DISALLOW_COPY_AND_ASSIGN(EternalHandles);
441 }; 433 };
442 434
443 435
444 } } // namespace v8::internal 436 } } // namespace v8::internal
445 437
446 #endif // V8_GLOBAL_HANDLES_H_ 438 #endif // V8_GLOBAL_HANDLES_H_
OLDNEW
« no previous file with comments | « no previous file | src/global-handles.cc » ('j') | src/global-handles.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698