| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 for (Node* current = head_; current != NULL; current = current->next()) { | 251 for (Node* current = head_; current != NULL; current = current->next()) { |
| 252 if (current->state_ == Node::WEAK | 252 if (current->state_ == Node::WEAK |
| 253 || current->state_ == Node::PENDING | 253 || current->state_ == Node::PENDING |
| 254 || current->state_ == Node::NEAR_DEATH) { | 254 || current->state_ == Node::NEAR_DEATH) { |
| 255 v->VisitPointer(¤t->object_); | 255 v->VisitPointer(¤t->object_); |
| 256 } | 256 } |
| 257 } | 257 } |
| 258 } | 258 } |
| 259 | 259 |
| 260 | 260 |
| 261 void GlobalHandles::MarkWeakRoots(WeakSlotCallback f) { | 261 void GlobalHandles::IdentifyWeakHandles(WeakSlotCallback f) { |
| 262 for (Node* current = head_; current != NULL; current = current->next()) { | 262 for (Node* current = head_; current != NULL; current = current->next()) { |
| 263 if (current->state_ == Node::WEAK) { | 263 if (current->state_ == Node::WEAK) { |
| 264 if (f(¤t->object_)) { | 264 if (f(¤t->object_)) { |
| 265 current->state_ = Node::PENDING; | 265 current->state_ = Node::PENDING; |
| 266 LOG(HandleEvent("GlobalHandle::Pending", current->handle().location())); | 266 LOG(HandleEvent("GlobalHandle::Pending", current->handle().location())); |
| 267 } | 267 } |
| 268 } | 268 } |
| 269 } | 269 } |
| 270 } | 270 } |
| 271 | 271 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 void GlobalHandles::RemoveObjectGroups() { | 374 void GlobalHandles::RemoveObjectGroups() { |
| 375 List<ObjectGroup*>* object_groups = ObjectGroups(); | 375 List<ObjectGroup*>* object_groups = ObjectGroups(); |
| 376 for (int i = 0; i< object_groups->length(); i++) { | 376 for (int i = 0; i< object_groups->length(); i++) { |
| 377 delete object_groups->at(i); | 377 delete object_groups->at(i); |
| 378 } | 378 } |
| 379 object_groups->Clear(); | 379 object_groups->Clear(); |
| 380 } | 380 } |
| 381 | 381 |
| 382 | 382 |
| 383 } } // namespace v8::internal | 383 } } // namespace v8::internal |
| OLD | NEW |