| 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 ASSERT(!m_preFinalizers.contains(&target)); | 536 ASSERT(!m_preFinalizers.contains(&target)); |
| 537 ASSERT(!sweepForbidden()); | 537 ASSERT(!sweepForbidden()); |
| 538 m_preFinalizers.add(&target, &T::invokePreFinalizer); | 538 m_preFinalizers.add(&target, &T::invokePreFinalizer); |
| 539 } | 539 } |
| 540 | 540 |
| 541 // Cancel above requests. The argument should be |*this|. This function is | 541 // Cancel above requests. The argument should be |*this|. This function is |
| 542 // ignored if it is called in pre-finalizer functions. | 542 // ignored if it is called in pre-finalizer functions. |
| 543 template<typename T> | 543 template<typename T> |
| 544 void unregisterPreFinalizer(T& target) | 544 void unregisterPreFinalizer(T& target) |
| 545 { | 545 { |
| 546 static_assert(sizeof(&T::invokePreFinalizer) > 0, "Declaration of USING_
PRE_FINALIZER()'s prefinalizer trampoline not in scope."); |
| 546 checkThread(); | 547 checkThread(); |
| 547 ASSERT(&T::invokePreFinalizer); | |
| 548 unregisterPreFinalizerInternal(&target); | 548 unregisterPreFinalizerInternal(&target); |
| 549 } | 549 } |
| 550 | 550 |
| 551 Vector<PageMemoryRegion*>& allocatedRegionsSinceLastGC() { return m_allocate
dRegionsSinceLastGC; } | 551 Vector<PageMemoryRegion*>& allocatedRegionsSinceLastGC() { return m_allocate
dRegionsSinceLastGC; } |
| 552 | 552 |
| 553 void shouldFlushHeapDoesNotContainCache() { m_shouldFlushHeapDoesNotContainC
ache = true; } | 553 void shouldFlushHeapDoesNotContainCache() { m_shouldFlushHeapDoesNotContainC
ache = true; } |
| 554 | 554 |
| 555 void registerTraceDOMWrappers(v8::Isolate* isolate, void (*traceDOMWrappers)
(v8::Isolate*, Visitor*)) | 555 void registerTraceDOMWrappers(v8::Isolate* isolate, void (*traceDOMWrappers)
(v8::Isolate*, Visitor*)) |
| 556 { | 556 { |
| 557 m_isolate = isolate; | 557 m_isolate = isolate; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 }; | 756 }; |
| 757 | 757 |
| 758 template<> class ThreadStateFor<AnyThread> { | 758 template<> class ThreadStateFor<AnyThread> { |
| 759 public: | 759 public: |
| 760 static ThreadState* state() { return ThreadState::current(); } | 760 static ThreadState* state() { return ThreadState::current(); } |
| 761 }; | 761 }; |
| 762 | 762 |
| 763 } // namespace blink | 763 } // namespace blink |
| 764 | 764 |
| 765 #endif // ThreadState_h | 765 #endif // ThreadState_h |
| OLD | NEW |