OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 { | 280 { |
281 m_raw = other; | 281 m_raw = other; |
282 checkPointer(); | 282 checkPointer(); |
283 recordBacktrace(); | 283 recordBacktrace(); |
284 return *this; | 284 return *this; |
285 } | 285 } |
286 | 286 |
287 T* get() const { return m_raw; } | 287 T* get() const { return m_raw; } |
288 | 288 |
289 private: | 289 private: |
| 290 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
290 void initialize() | 291 void initialize() |
291 { | 292 { |
292 ThreadState* state = ThreadStateFor<ThreadingTrait<T>::Affinity>::state(
); | 293 ThreadState* state = ThreadStateFor<ThreadingTrait<T>::Affinity>::state(
); |
293 state->checkThread(); | 294 state->checkThread(); |
294 m_prev = state->roots(); | 295 m_prev = state->roots(); |
295 m_next = m_prev->m_next; | 296 m_next = m_prev->m_next; |
296 m_prev->m_next = this; | 297 m_prev->m_next = this; |
297 m_next->m_prev = this; | 298 m_next->m_prev = this; |
298 } | 299 } |
299 | 300 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 { | 479 { |
479 m_raw = other; | 480 m_raw = other; |
480 checkPointer(); | 481 checkPointer(); |
481 recordBacktrace(); | 482 recordBacktrace(); |
482 return *this; | 483 return *this; |
483 } | 484 } |
484 | 485 |
485 T* get() const { return m_raw; } | 486 T* get() const { return m_raw; } |
486 | 487 |
487 private: | 488 private: |
| 489 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
488 void initialize() | 490 void initialize() |
489 { | 491 { |
490 MutexLocker m_locker(ThreadState::globalRootsMutex()); | 492 MutexLocker m_locker(ThreadState::globalRootsMutex()); |
491 m_prev = &ThreadState::globalRoots(); | 493 m_prev = &ThreadState::globalRoots(); |
492 m_next = m_prev->m_next; | 494 m_next = m_prev->m_next; |
493 m_prev->m_next = this; | 495 m_prev->m_next = this; |
494 m_next->m_prev = this; | 496 m_next->m_prev = this; |
495 } | 497 } |
496 | 498 |
497 NO_LAZY_SWEEP_SANITIZE_ADDRESS | 499 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 } | 571 } |
570 | 572 |
571 template<typename VisitorDispatcher> | 573 template<typename VisitorDispatcher> |
572 void trace(VisitorDispatcher visitor) | 574 void trace(VisitorDispatcher visitor) |
573 { | 575 { |
574 static_assert(sizeof(Collection), "Collection must be fully defined"); | 576 static_assert(sizeof(Collection), "Collection must be fully defined"); |
575 visitor->trace(*static_cast<Collection*>(this)); | 577 visitor->trace(*static_cast<Collection*>(this)); |
576 } | 578 } |
577 | 579 |
578 private: | 580 private: |
| 581 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
579 void initialize() | 582 void initialize() |
580 { | 583 { |
581 ThreadState* state = ThreadState::current(); | 584 ThreadState* state = ThreadState::current(); |
582 m_prev = state->roots(); | 585 m_prev = state->roots(); |
583 m_next = m_prev->m_next; | 586 m_next = m_prev->m_next; |
584 m_prev->m_next = this; | 587 m_prev->m_next = this; |
585 m_next->m_prev = this; | 588 m_next->m_prev = this; |
586 } | 589 } |
587 | 590 |
588 NO_LAZY_SWEEP_SANITIZE_ADDRESS | 591 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1287 struct ParamStorageTraits<RawPtr<T>> : public PointerParamStorageTraits<T*, blin
k::IsGarbageCollectedType<T>::value> { | 1290 struct ParamStorageTraits<RawPtr<T>> : public PointerParamStorageTraits<T*, blin
k::IsGarbageCollectedType<T>::value> { |
1288 static_assert(sizeof(T), "T must be fully defined"); | 1291 static_assert(sizeof(T), "T must be fully defined"); |
1289 }; | 1292 }; |
1290 | 1293 |
1291 template<typename T> | 1294 template<typename T> |
1292 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; | 1295 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; |
1293 | 1296 |
1294 } // namespace WTF | 1297 } // namespace WTF |
1295 | 1298 |
1296 #endif | 1299 #endif |
OLD | NEW |