Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Side by Side Diff: Source/platform/heap/Handle.h

Issue 1171923002: Oilpan: Add NO_LAZY_SWEEP_SANITIZE_ADDRESS to Persistent::uninitialize (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 void initialize() 297 void initialize()
298 { 298 {
299 ThreadState* state = ThreadStateFor<ThreadingTrait<T>::Affinity>::state( ); 299 ThreadState* state = ThreadStateFor<ThreadingTrait<T>::Affinity>::state( );
300 state->checkThread(); 300 state->checkThread();
301 m_prev = state->roots(); 301 m_prev = state->roots();
302 m_next = m_prev->m_next; 302 m_next = m_prev->m_next;
303 m_prev->m_next = this; 303 m_prev->m_next = this;
304 m_next->m_prev = this; 304 m_next->m_prev = this;
305 } 305 }
306 306
307 NO_LAZY_SWEEP_SANITIZE_ADDRESS
307 void uninitialize() 308 void uninitialize()
308 { 309 {
309 ASSERT(isHeapObjectAlive()); 310 ASSERT(isHeapObjectAlive());
310 ASSERT(m_next->isHeapObjectAlive()); 311 ASSERT(m_next->isHeapObjectAlive());
311 ASSERT(m_prev->isHeapObjectAlive()); 312 ASSERT(m_prev->isHeapObjectAlive());
312 m_next->m_prev = m_prev; 313 m_next->m_prev = m_prev;
313 m_prev->m_next = m_next; 314 m_prev->m_next = m_next;
314 } 315 }
315 316
316 void checkPointer() 317 void checkPointer()
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 private: 496 private:
496 void initialize() 497 void initialize()
497 { 498 {
498 MutexLocker m_locker(ThreadState::globalRootsMutex()); 499 MutexLocker m_locker(ThreadState::globalRootsMutex());
499 m_prev = &ThreadState::globalRoots(); 500 m_prev = &ThreadState::globalRoots();
500 m_next = m_prev->m_next; 501 m_next = m_prev->m_next;
501 m_prev->m_next = this; 502 m_prev->m_next = this;
502 m_next->m_prev = this; 503 m_next->m_prev = this;
503 } 504 }
504 505
506 NO_LAZY_SWEEP_SANITIZE_ADDRESS
505 void uninitialize() 507 void uninitialize()
506 { 508 {
507 MutexLocker m_locker(ThreadState::globalRootsMutex()); 509 MutexLocker m_locker(ThreadState::globalRootsMutex());
508 ASSERT(isHeapObjectAlive()); 510 ASSERT(isHeapObjectAlive());
509 ASSERT(m_next->isHeapObjectAlive()); 511 ASSERT(m_next->isHeapObjectAlive());
510 ASSERT(m_prev->isHeapObjectAlive()); 512 ASSERT(m_prev->isHeapObjectAlive());
511 m_next->m_prev = m_prev; 513 m_next->m_prev = m_prev;
512 m_prev->m_next = m_next; 514 m_prev->m_next = m_next;
513 } 515 }
514 516
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 private: 587 private:
586 void initialize() 588 void initialize()
587 { 589 {
588 ThreadState* state = ThreadState::current(); 590 ThreadState* state = ThreadState::current();
589 m_prev = state->roots(); 591 m_prev = state->roots();
590 m_next = m_prev->m_next; 592 m_next = m_prev->m_next;
591 m_prev->m_next = this; 593 m_prev->m_next = this;
592 m_next->m_prev = this; 594 m_next->m_prev = this;
593 } 595 }
594 596
597 NO_LAZY_SWEEP_SANITIZE_ADDRESS
595 void uninitialize() 598 void uninitialize()
596 { 599 {
597 ASSERT(isHeapObjectAlive()); 600 ASSERT(isHeapObjectAlive());
598 ASSERT(m_next->isHeapObjectAlive()); 601 ASSERT(m_next->isHeapObjectAlive());
599 ASSERT(m_prev->isHeapObjectAlive()); 602 ASSERT(m_prev->isHeapObjectAlive());
600 m_next->m_prev = m_prev; 603 m_next->m_prev = m_prev;
601 m_prev->m_next = m_next; 604 m_prev->m_next = m_next;
602 } 605 }
603 }; 606 };
604 607
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698