| 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 20 matching lines...) Expand all Loading... |
| 31 #ifndef ThreadState_h | 31 #ifndef ThreadState_h |
| 32 #define ThreadState_h | 32 #define ThreadState_h |
| 33 | 33 |
| 34 #include "heap/AddressSanitizer.h" | 34 #include "heap/AddressSanitizer.h" |
| 35 #include "heap/HeapExport.h" | 35 #include "heap/HeapExport.h" |
| 36 #include "wtf/HashSet.h" | 36 #include "wtf/HashSet.h" |
| 37 #include "wtf/OwnPtr.h" | 37 #include "wtf/OwnPtr.h" |
| 38 #include "wtf/PassOwnPtr.h" | 38 #include "wtf/PassOwnPtr.h" |
| 39 #include "wtf/ThreadSpecific.h" | 39 #include "wtf/ThreadSpecific.h" |
| 40 #include "wtf/Threading.h" | 40 #include "wtf/Threading.h" |
| 41 #include "wtf/ThreadingPrimitives.h" |
| 41 #include "wtf/Vector.h" | 42 #include "wtf/Vector.h" |
| 42 | 43 |
| 43 namespace WebCore { | 44 namespace WebCore { |
| 44 | 45 |
| 45 class BaseHeap; | 46 class BaseHeap; |
| 46 class BaseHeapPage; | 47 class BaseHeapPage; |
| 47 class FinalizedHeapObjectHeader; | 48 class FinalizedHeapObjectHeader; |
| 48 class HeapContainsCache; | 49 class HeapContainsCache; |
| 49 class HeapObjectHeader; | 50 class HeapObjectHeader; |
| 50 class PersistentNode; | 51 class PersistentNode; |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 bool contains(const void* pointer) { return contains(const_cast<void*>(point
er)); } | 447 bool contains(const void* pointer) { return contains(const_cast<void*>(point
er)); } |
| 447 | 448 |
| 448 // Finds the Blink HeapPage in this thread-specific heap | 449 // Finds the Blink HeapPage in this thread-specific heap |
| 449 // corresponding to a given address. Return 0 if the address is | 450 // corresponding to a given address. Return 0 if the address is |
| 450 // not contained in any of the pages. | 451 // not contained in any of the pages. |
| 451 BaseHeapPage* heapPageFromAddress(Address); | 452 BaseHeapPage* heapPageFromAddress(Address); |
| 452 | 453 |
| 453 // List of persistent roots allocated on the given thread. | 454 // List of persistent roots allocated on the given thread. |
| 454 PersistentNode* roots() const { return m_persistents; } | 455 PersistentNode* roots() const { return m_persistents; } |
| 455 | 456 |
| 457 // List of global persistent roots not owned by any particular thread. |
| 458 // globalRootsMutex must be acquired before any modifications. |
| 459 static PersistentNode* globalRoots(); |
| 460 static Mutex& globalRootsMutex(); |
| 461 |
| 456 // Visit local thread stack and trace all pointers conservatively. | 462 // Visit local thread stack and trace all pointers conservatively. |
| 457 void visitStack(Visitor*); | 463 void visitStack(Visitor*); |
| 458 | 464 |
| 459 // Visit all persistents allocated on this thread. | 465 // Visit all persistents allocated on this thread. |
| 460 void visitPersistents(Visitor*); | 466 void visitPersistents(Visitor*); |
| 461 | 467 |
| 462 // Checks a given address and if a pointer into the oilpan heap marks | 468 // Checks a given address and if a pointer into the oilpan heap marks |
| 463 // the object to which it points. | 469 // the object to which it points. |
| 464 bool checkAndMarkPointer(Visitor*, Address); | 470 bool checkAndMarkPointer(Visitor*, Address); |
| 465 | 471 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 USED_FROM_MULTIPLE_THREADS(SubtleCrypto); | 557 USED_FROM_MULTIPLE_THREADS(SubtleCrypto); |
| 552 USED_FROM_MULTIPLE_THREADS(TextDecoder); | 558 USED_FROM_MULTIPLE_THREADS(TextDecoder); |
| 553 USED_FROM_MULTIPLE_THREADS(TextEncoder); | 559 USED_FROM_MULTIPLE_THREADS(TextEncoder); |
| 554 USED_FROM_MULTIPLE_THREADS(WebKitNotification); | 560 USED_FROM_MULTIPLE_THREADS(WebKitNotification); |
| 555 USED_FROM_MULTIPLE_THREADS(WorkerCrypto); | 561 USED_FROM_MULTIPLE_THREADS(WorkerCrypto); |
| 556 USED_FROM_MULTIPLE_THREADS(WorkerPerformance); | 562 USED_FROM_MULTIPLE_THREADS(WorkerPerformance); |
| 557 | 563 |
| 558 } | 564 } |
| 559 | 565 |
| 560 #endif // ThreadState_h | 566 #endif // ThreadState_h |
| OLD | NEW |