OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ActiveScriptWrappable_h | 5 #ifndef ActiveScriptWrappable_h |
6 #define ActiveScriptWrappable_h | 6 #define ActiveScriptWrappable_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
10 #include "wtf/Noncopyable.h" | 10 #include "wtf/Noncopyable.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 * thread-specific list. They keep their wrappers and dependant objects alive | 23 * thread-specific list. They keep their wrappers and dependant objects alive |
24 * as long as they have pending activity. | 24 * as long as they have pending activity. |
25 */ | 25 */ |
26 class CORE_EXPORT ActiveScriptWrappable : public GarbageCollectedMixin { | 26 class CORE_EXPORT ActiveScriptWrappable : public GarbageCollectedMixin { |
27 WTF_MAKE_NONCOPYABLE(ActiveScriptWrappable); | 27 WTF_MAKE_NONCOPYABLE(ActiveScriptWrappable); |
28 public: | 28 public: |
29 explicit ActiveScriptWrappable(ScriptWrappable*); | 29 explicit ActiveScriptWrappable(ScriptWrappable*); |
30 | 30 |
31 static void traceActiveScriptWrappables(v8::Isolate*, ScriptWrappableVisitor
*); | 31 static void traceActiveScriptWrappables(v8::Isolate*, ScriptWrappableVisitor
*); |
32 | 32 |
33 virtual bool hasPendingActivity() const = 0; | 33 private: |
34 | |
35 ScriptWrappable* toScriptWrappable() const { return m_scriptWrappable; } | 34 ScriptWrappable* toScriptWrappable() const { return m_scriptWrappable; } |
36 | 35 |
37 private: | |
38 ScriptWrappable* m_scriptWrappable; | 36 ScriptWrappable* m_scriptWrappable; |
39 }; | 37 }; |
40 | 38 |
41 } // namespace blink | 39 } // namespace blink |
42 | 40 |
43 #endif // ActiveScriptWrappable_h | 41 #endif // ActiveScriptWrappable_h |
OLD | NEW |