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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 #include "platform/PlatformExport.h" | 34 #include "platform/PlatformExport.h" |
35 #include "platform/heap/BlinkGC.h" | 35 #include "platform/heap/BlinkGC.h" |
36 #include "platform/heap/BlinkGCInterruptor.h" | 36 #include "platform/heap/BlinkGCInterruptor.h" |
37 #include "platform/heap/ThreadingTraits.h" | 37 #include "platform/heap/ThreadingTraits.h" |
38 #include "public/platform/WebThread.h" | 38 #include "public/platform/WebThread.h" |
39 #include "wtf/AddressSanitizer.h" | 39 #include "wtf/AddressSanitizer.h" |
40 #include "wtf/Forward.h" | 40 #include "wtf/Forward.h" |
41 #include "wtf/HashMap.h" | 41 #include "wtf/HashMap.h" |
42 #include "wtf/HashSet.h" | 42 #include "wtf/HashSet.h" |
43 #include "wtf/PassOwnPtr.h" | |
44 #include "wtf/ThreadSpecific.h" | 43 #include "wtf/ThreadSpecific.h" |
45 #include "wtf/Threading.h" | 44 #include "wtf/Threading.h" |
46 #include "wtf/ThreadingPrimitives.h" | 45 #include "wtf/ThreadingPrimitives.h" |
47 | 46 |
48 namespace v8 { | 47 namespace v8 { |
49 class Isolate; | 48 class Isolate; |
50 }; | 49 }; |
51 | 50 |
52 namespace blink { | 51 namespace blink { |
53 | 52 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 #define USING_PRE_FINALIZER(Class, preFinalizer) \ | 103 #define USING_PRE_FINALIZER(Class, preFinalizer) \ |
105 public: \ | 104 public: \ |
106 static bool invokePreFinalizer(void* object) \ | 105 static bool invokePreFinalizer(void* object) \ |
107 { \ | 106 { \ |
108 Class* self = reinterpret_cast<Class*>(object); \ | 107 Class* self = reinterpret_cast<Class*>(object); \ |
109 if (Heap::isHeapObjectAlive(self)) \ | 108 if (Heap::isHeapObjectAlive(self)) \ |
110 return false; \ | 109 return false; \ |
111 self->Class::preFinalizer(); \ | 110 self->Class::preFinalizer(); \ |
112 return true; \ | 111 return true; \ |
113 } \ | 112 } \ |
114 using UsingPreFinazlizerMacroNeedsTrailingSemiColon = char | 113 using UsingPreFinalizerMacroNeedsTrailingSemiColon = char |
115 | 114 |
116 #if ENABLE(OILPAN) | 115 #if ENABLE(OILPAN) |
117 #define WILL_BE_USING_PRE_FINALIZER(Class, method) USING_PRE_FINALIZER(Class, me
thod) | 116 #define WILL_BE_USING_PRE_FINALIZER(Class, method) USING_PRE_FINALIZER(Class, me
thod) |
118 #else | 117 #else |
119 #define WILL_BE_USING_PRE_FINALIZER(Class, method) | 118 #define WILL_BE_USING_PRE_FINALIZER(Class, method) |
120 #endif | 119 #endif |
121 | 120 |
122 class PLATFORM_EXPORT ThreadState { | 121 class PLATFORM_EXPORT ThreadState { |
123 WTF_MAKE_NONCOPYABLE(ThreadState); | 122 WTF_MAKE_NONCOPYABLE(ThreadState); |
124 public: | 123 public: |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 }; | 672 }; |
674 | 673 |
675 template<> class ThreadStateFor<AnyThread> { | 674 template<> class ThreadStateFor<AnyThread> { |
676 public: | 675 public: |
677 static ThreadState* state() { return ThreadState::current(); } | 676 static ThreadState* state() { return ThreadState::current(); } |
678 }; | 677 }; |
679 | 678 |
680 } // namespace blink | 679 } // namespace blink |
681 | 680 |
682 #endif // ThreadState_h | 681 #endif // ThreadState_h |
OLD | NEW |