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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 ASSERT(checkThread()); | 411 ASSERT(checkThread()); |
412 // Ignore pre-finalizers called during pre-finalizers or destructors. | 412 // Ignore pre-finalizers called during pre-finalizers or destructors. |
413 if (sweepForbidden()) | 413 if (sweepForbidden()) |
414 return; | 414 return; |
415 ASSERT(m_orderedPreFinalizers.contains(PreFinalizer(self, T::invokePreFi
nalizer))); | 415 ASSERT(m_orderedPreFinalizers.contains(PreFinalizer(self, T::invokePreFi
nalizer))); |
416 m_orderedPreFinalizers.remove(PreFinalizer(self, &T::invokePreFinalizer)
); | 416 m_orderedPreFinalizers.remove(PreFinalizer(self, &T::invokePreFinalizer)
); |
417 } | 417 } |
418 | 418 |
419 void shouldFlushHeapDoesNotContainCache() { m_shouldFlushHeapDoesNotContainC
ache = true; } | 419 void shouldFlushHeapDoesNotContainCache() { m_shouldFlushHeapDoesNotContainC
ache = true; } |
420 | 420 |
421 void registerTraceDOMWrappers(v8::Isolate* isolate, void (*traceDOMWrappers)
(v8::Isolate*, Visitor*)) | 421 void registerTraceDOMWrappers(v8::Isolate* isolate, |
| 422 void (*traceDOMWrappers)(v8::Isolate*, Visitor*), |
| 423 void (*invalidateDeadObjectsInWrappersMarkingDeque)(v8::Isolate*)) |
422 { | 424 { |
423 m_isolate = isolate; | 425 m_isolate = isolate; |
424 m_traceDOMWrappers = traceDOMWrappers; | 426 m_traceDOMWrappers = traceDOMWrappers; |
| 427 m_invalidateDeadObjectsInWrappersMarkingDeque = invalidateDeadObjectsInW
rappersMarkingDeque; |
425 } | 428 } |
426 | 429 |
427 // By entering a gc-forbidden scope, conservative GCs will not | 430 // By entering a gc-forbidden scope, conservative GCs will not |
428 // be allowed while handling an out-of-line allocation request. | 431 // be allowed while handling an out-of-line allocation request. |
429 // Intended used when constructing subclasses of GC mixins, where | 432 // Intended used when constructing subclasses of GC mixins, where |
430 // the object being constructed cannot be safely traced & marked | 433 // the object being constructed cannot be safely traced & marked |
431 // fully should a GC be allowed while its subclasses are being | 434 // fully should a GC be allowed while its subclasses are being |
432 // constructed. | 435 // constructed. |
433 void enterGCForbiddenScopeIfNeeded(GarbageCollectedMixinConstructorMarker* g
cMixinMarker) | 436 void enterGCForbiddenScopeIfNeeded(GarbageCollectedMixinConstructorMarker* g
cMixinMarker) |
434 { | 437 { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 | 652 |
650 CallbackStack* m_threadLocalWeakCallbackStack; | 653 CallbackStack* m_threadLocalWeakCallbackStack; |
651 | 654 |
652 // Pre-finalizers are called in the reverse order in which they are | 655 // Pre-finalizers are called in the reverse order in which they are |
653 // registered by the constructors (including constructors of Mixin objects) | 656 // registered by the constructors (including constructors of Mixin objects) |
654 // for an object, by processing the m_orderedPreFinalizers back-to-front. | 657 // for an object, by processing the m_orderedPreFinalizers back-to-front. |
655 ListHashSet<PreFinalizer> m_orderedPreFinalizers; | 658 ListHashSet<PreFinalizer> m_orderedPreFinalizers; |
656 | 659 |
657 v8::Isolate* m_isolate; | 660 v8::Isolate* m_isolate; |
658 void (*m_traceDOMWrappers)(v8::Isolate*, Visitor*); | 661 void (*m_traceDOMWrappers)(v8::Isolate*, Visitor*); |
| 662 void (*m_invalidateDeadObjectsInWrappersMarkingDeque)(v8::Isolate*); |
659 | 663 |
660 #if defined(ADDRESS_SANITIZER) | 664 #if defined(ADDRESS_SANITIZER) |
661 void* m_asanFakeStack; | 665 void* m_asanFakeStack; |
662 #endif | 666 #endif |
663 | 667 |
664 // PersistentNodes that are stored in static references; | 668 // PersistentNodes that are stored in static references; |
665 // references that either have to be cleared upon the thread | 669 // references that either have to be cleared upon the thread |
666 // detaching from Oilpan and shutting down or references we | 670 // detaching from Oilpan and shutting down or references we |
667 // have to clear before initiating LSan's leak detection. | 671 // have to clear before initiating LSan's leak detection. |
668 HashMap<PersistentNode*, PersistentClearCallback> m_staticPersistents; | 672 HashMap<PersistentNode*, PersistentClearCallback> m_staticPersistents; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 | 705 |
702 template<> class ThreadStateFor<AnyThread> { | 706 template<> class ThreadStateFor<AnyThread> { |
703 STATIC_ONLY(ThreadStateFor); | 707 STATIC_ONLY(ThreadStateFor); |
704 public: | 708 public: |
705 static ThreadState* state() { return ThreadState::current(); } | 709 static ThreadState* state() { return ThreadState::current(); } |
706 }; | 710 }; |
707 | 711 |
708 } // namespace blink | 712 } // namespace blink |
709 | 713 |
710 #endif // ThreadState_h | 714 #endif // ThreadState_h |
OLD | NEW |