| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 void attach(ThreadState*); | 287 void attach(ThreadState*); |
| 288 void detach(ThreadState*); | 288 void detach(ThreadState*); |
| 289 void lockThreadAttachMutex(); | 289 void lockThreadAttachMutex(); |
| 290 void unlockThreadAttachMutex(); | 290 void unlockThreadAttachMutex(); |
| 291 | 291 |
| 292 void visitPersistentRoots(Visitor*); | 292 void visitPersistentRoots(Visitor*); |
| 293 void visitStackRoots(Visitor*); | 293 void visitStackRoots(Visitor*); |
| 294 void enterSafePoint(ThreadState*); | 294 void enterSafePoint(ThreadState*); |
| 295 void leaveSafePoint(); | 295 void leaveSafePoint(); |
| 296 | 296 |
| 297 static RecursiveMutex& allHeapsMutex(); | |
| 298 static HashSet<ThreadHeap*>& allHeaps(); | |
| 299 | |
| 300 // Is the finalizable GC object still alive, but slated for lazy sweeping? | 297 // Is the finalizable GC object still alive, but slated for lazy sweeping? |
| 301 // If a lazy sweep is in progress, returns true if the object was found | 298 // If a lazy sweep is in progress, returns true if the object was found |
| 302 // to be not reachable during the marking phase, but it has yet to be swept | 299 // to be not reachable during the marking phase, but it has yet to be swept |
| 303 // and finalized. The predicate returns false in all other cases. | 300 // and finalized. The predicate returns false in all other cases. |
| 304 // | 301 // |
| 305 // Holding a reference to an already-dead object is not a valid state | 302 // Holding a reference to an already-dead object is not a valid state |
| 306 // to be in; willObjectBeLazilySwept() has undefined behavior if passed | 303 // to be in; willObjectBeLazilySwept() has undefined behavior if passed |
| 307 // such a reference. | 304 // such a reference. |
| 308 template <typename T> | 305 template <typename T> |
| 309 NO_SANITIZE_ADDRESS static bool willObjectBeLazilySwept( | 306 NO_SANITIZE_ADDRESS static bool willObjectBeLazilySwept( |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 T** cell = reinterpret_cast<T**>(object); | 680 T** cell = reinterpret_cast<T**>(object); |
| 684 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) | 681 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) |
| 685 *cell = nullptr; | 682 *cell = nullptr; |
| 686 } | 683 } |
| 687 | 684 |
| 688 } // namespace blink | 685 } // namespace blink |
| 689 | 686 |
| 690 #include "platform/heap/VisitorImpl.h" | 687 #include "platform/heap/VisitorImpl.h" |
| 691 | 688 |
| 692 #endif // Heap_h | 689 #endif // Heap_h |
| OLD | NEW |