| OLD | NEW |
| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // in the callback by using the location() of the handle. | 141 // in the callback by using the location() of the handle. |
| 142 static void MakeWeak(Object** location, void* parameter, | 142 static void MakeWeak(Object** location, void* parameter, |
| 143 WeakCallback weak_callback); | 143 WeakCallback weak_callback); |
| 144 | 144 |
| 145 // It would be nice to template this one, but it's really hard to get | 145 // It would be nice to template this one, but it's really hard to get |
| 146 // the template instantiator to work right if you do. | 146 // the template instantiator to work right if you do. |
| 147 static void MakeWeak(Object** location, void* parameter, | 147 static void MakeWeak(Object** location, void* parameter, |
| 148 WeakCallbackInfo<void>::Callback weak_callback, | 148 WeakCallbackInfo<void>::Callback weak_callback, |
| 149 v8::WeakCallbackType type); | 149 v8::WeakCallbackType type); |
| 150 | 150 |
| 151 static void AddObjectToMarkingDeque(Object** object, Isolate* isolate); |
| 152 |
| 151 void RecordStats(HeapStats* stats); | 153 void RecordStats(HeapStats* stats); |
| 152 | 154 |
| 153 // Returns the current number of weak handles. | 155 // Returns the current number of weak handles. |
| 154 int NumberOfWeakHandles(); | 156 int NumberOfWeakHandles(); |
| 155 | 157 |
| 156 // Returns the current number of weak handles to global objects. | 158 // Returns the current number of weak handles to global objects. |
| 157 // These handles are also included in NumberOfWeakHandles(). | 159 // These handles are also included in NumberOfWeakHandles(). |
| 158 int NumberOfGlobalObjectWeakHandles(); | 160 int NumberOfGlobalObjectWeakHandles(); |
| 159 | 161 |
| 160 // Returns the current number of handles to global objects. | 162 // Returns the current number of handles to global objects. |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; | 457 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; |
| 456 | 458 |
| 457 DISALLOW_COPY_AND_ASSIGN(EternalHandles); | 459 DISALLOW_COPY_AND_ASSIGN(EternalHandles); |
| 458 }; | 460 }; |
| 459 | 461 |
| 460 | 462 |
| 461 } // namespace internal | 463 } // namespace internal |
| 462 } // namespace v8 | 464 } // namespace v8 |
| 463 | 465 |
| 464 #endif // V8_GLOBAL_HANDLES_H_ | 466 #endif // V8_GLOBAL_HANDLES_H_ |
| OLD | NEW |