| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 // Tear down the global handle structure. | 132 // Tear down the global handle structure. |
| 133 void TearDown(); | 133 void TearDown(); |
| 134 | 134 |
| 135 #ifdef DEBUG | 135 #ifdef DEBUG |
| 136 void PrintStats(); | 136 void PrintStats(); |
| 137 void Print(); | 137 void Print(); |
| 138 #endif | 138 #endif |
| 139 class Pool; | 139 class Pool; |
| 140 private: | 140 private: |
| 141 GlobalHandles(); | 141 explicit GlobalHandles(Isolate* isolate); |
| 142 | 142 |
| 143 // Internal node structure, one for each global handle. | 143 // Internal node structure, one for each global handle. |
| 144 class Node; | 144 class Node; |
| 145 | 145 |
| 146 Isolate* isolate_; |
| 147 |
| 146 // Field always containing the number of weak and near-death handles. | 148 // Field always containing the number of weak and near-death handles. |
| 147 int number_of_weak_handles_; | 149 int number_of_weak_handles_; |
| 148 | 150 |
| 149 // Field always containing the number of weak and near-death handles | 151 // Field always containing the number of weak and near-death handles |
| 150 // to global objects. These objects are also included in | 152 // to global objects. These objects are also included in |
| 151 // number_of_weak_handles_. | 153 // number_of_weak_handles_. |
| 152 int number_of_global_object_weak_handles_; | 154 int number_of_global_object_weak_handles_; |
| 153 | 155 |
| 154 // Global handles are kept in a single linked list pointed to by head_. | 156 // Global handles are kept in a single linked list pointed to by head_. |
| 155 Node* head_; | 157 Node* head_; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 184 | 186 |
| 185 friend class Isolate; | 187 friend class Isolate; |
| 186 | 188 |
| 187 DISALLOW_COPY_AND_ASSIGN(GlobalHandles); | 189 DISALLOW_COPY_AND_ASSIGN(GlobalHandles); |
| 188 }; | 190 }; |
| 189 | 191 |
| 190 | 192 |
| 191 } } // namespace v8::internal | 193 } } // namespace v8::internal |
| 192 | 194 |
| 193 #endif // V8_GLOBAL_HANDLES_H_ | 195 #endif // V8_GLOBAL_HANDLES_H_ |
| OLD | NEW |