Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(849)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.h

Issue 1876383003: Introduce infrastructure for tracing ScriptWrappables. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix var used only in assert Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "wtf/Noncopyable.h" 9 #include "wtf/Noncopyable.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class ScriptWrappable; 13 class ScriptWrappable;
14 class ScriptWrappableVisitor;
14 15
15 /** 16 /**
16 * Classes deriving from ActiveScriptWrappable will be registered in a 17 * Classes deriving from ActiveScriptWrappable will be registered in a
17 * thread-specific list. They keep their wrappers and dependant objects alive 18 * thread-specific list. They keep their wrappers and dependant objects alive
18 * as long as they have pending activity. 19 * as long as they have pending activity.
19 */ 20 */
20 class CORE_EXPORT ActiveScriptWrappable { 21 class CORE_EXPORT ActiveScriptWrappable {
21 WTF_MAKE_NONCOPYABLE(ActiveScriptWrappable); 22 WTF_MAKE_NONCOPYABLE(ActiveScriptWrappable);
22 public: 23 public:
23 explicit ActiveScriptWrappable(ScriptWrappable*); 24 explicit ActiveScriptWrappable(ScriptWrappable*);
24 25
26 static void traceActiveScriptWrappables(ScriptWrappableVisitor*);
27
25 virtual bool hasPendingActivity() const = 0; 28 virtual bool hasPendingActivity() const = 0;
26 29
27 ScriptWrappable* toScriptWrappable() const; 30 ScriptWrappable* toScriptWrappable() const;
28 31
29 protected: 32 protected:
30 virtual ~ActiveScriptWrappable(); 33 virtual ~ActiveScriptWrappable();
31 34
32 private: 35 private:
33 ScriptWrappable* m_scriptWrappable; 36 ScriptWrappable* m_scriptWrappable;
34 }; 37 };
35 38
36 } // namespace blink 39 } // namespace blink
37 40
38 #endif // ActiveScriptWrappable_h 41 #endif // ActiveScriptWrappable_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698