Chromium Code Reviews| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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, void (*traceDOMWrappers) (v8::Isolate*, Visitor*)) |
| 422 { | 422 { |
| 423 m_isolate = isolate; | 423 m_isolate = isolate; |
| 424 m_traceDOMWrappers = traceDOMWrappers; | 424 m_traceDOMWrappers = traceDOMWrappers; |
| 425 } | 425 } |
| 426 | 426 |
| 427 void registerTraceWrappersMarkingDequeTracing(v8::Isolate* isolate, | |
| 428 void (*traceWrappersMarkingDequeTracing)(v8::Isolate*, Visitor*)) | |
| 429 { | |
| 430 // Make sure the isolate set by registerTraceDOMWrapers is the same as | |
|
haraken
2016/06/08 08:56:08
Or can we merge the two register functions?
| |
| 431 // ours | |
| 432 CHECK(m_isolate == isolate); | |
| 433 m_traceWrappersMarkingDequeTracing = traceWrappersMarkingDequeTracing; | |
| 434 } | |
| 435 | |
| 427 // By entering a gc-forbidden scope, conservative GCs will not | 436 // By entering a gc-forbidden scope, conservative GCs will not |
| 428 // be allowed while handling an out-of-line allocation request. | 437 // be allowed while handling an out-of-line allocation request. |
| 429 // Intended used when constructing subclasses of GC mixins, where | 438 // Intended used when constructing subclasses of GC mixins, where |
| 430 // the object being constructed cannot be safely traced & marked | 439 // the object being constructed cannot be safely traced & marked |
| 431 // fully should a GC be allowed while its subclasses are being | 440 // fully should a GC be allowed while its subclasses are being |
| 432 // constructed. | 441 // constructed. |
| 433 void enterGCForbiddenScopeIfNeeded(GarbageCollectedMixinConstructorMarker* g cMixinMarker) | 442 void enterGCForbiddenScopeIfNeeded(GarbageCollectedMixinConstructorMarker* g cMixinMarker) |
| 434 { | 443 { |
| 435 ASSERT(checkThread()); | 444 ASSERT(checkThread()); |
| 436 if (!m_gcMixinMarker) { | 445 if (!m_gcMixinMarker) { |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 649 | 658 |
| 650 CallbackStack* m_threadLocalWeakCallbackStack; | 659 CallbackStack* m_threadLocalWeakCallbackStack; |
| 651 | 660 |
| 652 // Pre-finalizers are called in the reverse order in which they are | 661 // Pre-finalizers are called in the reverse order in which they are |
| 653 // registered by the constructors (including constructors of Mixin objects) | 662 // registered by the constructors (including constructors of Mixin objects) |
| 654 // for an object, by processing the m_orderedPreFinalizers back-to-front. | 663 // for an object, by processing the m_orderedPreFinalizers back-to-front. |
| 655 ListHashSet<PreFinalizer> m_orderedPreFinalizers; | 664 ListHashSet<PreFinalizer> m_orderedPreFinalizers; |
| 656 | 665 |
| 657 v8::Isolate* m_isolate; | 666 v8::Isolate* m_isolate; |
| 658 void (*m_traceDOMWrappers)(v8::Isolate*, Visitor*); | 667 void (*m_traceDOMWrappers)(v8::Isolate*, Visitor*); |
| 668 void (*m_traceWrappersMarkingDequeTracing)(v8::Isolate*, Visitor*); | |
| 659 | 669 |
| 660 #if defined(ADDRESS_SANITIZER) | 670 #if defined(ADDRESS_SANITIZER) |
| 661 void* m_asanFakeStack; | 671 void* m_asanFakeStack; |
| 662 #endif | 672 #endif |
| 663 | 673 |
| 664 // PersistentNodes that are stored in static references; | 674 // PersistentNodes that are stored in static references; |
| 665 // references that either have to be cleared upon the thread | 675 // references that either have to be cleared upon the thread |
| 666 // detaching from Oilpan and shutting down or references we | 676 // detaching from Oilpan and shutting down or references we |
| 667 // have to clear before initiating LSan's leak detection. | 677 // have to clear before initiating LSan's leak detection. |
| 668 HashMap<PersistentNode*, PersistentClearCallback> m_staticPersistents; | 678 HashMap<PersistentNode*, PersistentClearCallback> m_staticPersistents; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 701 | 711 |
| 702 template<> class ThreadStateFor<AnyThread> { | 712 template<> class ThreadStateFor<AnyThread> { |
| 703 STATIC_ONLY(ThreadStateFor); | 713 STATIC_ONLY(ThreadStateFor); |
| 704 public: | 714 public: |
| 705 static ThreadState* state() { return ThreadState::current(); } | 715 static ThreadState* state() { return ThreadState::current(); } |
| 706 }; | 716 }; |
| 707 | 717 |
| 708 } // namespace blink | 718 } // namespace blink |
| 709 | 719 |
| 710 #endif // ThreadState_h | 720 #endif // ThreadState_h |
| OLD | NEW |