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

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

Issue 1966743004: Move tracking of ActiveScriptWrappables to V8PerIsolateData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lazy creation of map Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "wtf/Noncopyable.h" 10 #include "wtf/Noncopyable.h"
11 11
12 namespace v8 {
13 class Isolate;
14 }
15
12 namespace blink { 16 namespace blink {
13 17
14 class ScriptWrappable; 18 class ScriptWrappable;
15 class ScriptWrappableVisitor; 19 class ScriptWrappableVisitor;
16 20
17 /** 21 /**
18 * Classes deriving from ActiveScriptWrappable will be registered in a 22 * Classes deriving from ActiveScriptWrappable will be registered in a
19 * thread-specific list. They keep their wrappers and dependant objects alive 23 * thread-specific list. They keep their wrappers and dependant objects alive
20 * as long as they have pending activity. 24 * as long as they have pending activity.
21 */ 25 */
22 class CORE_EXPORT ActiveScriptWrappable : public GarbageCollectedMixin { 26 class CORE_EXPORT ActiveScriptWrappable : public GarbageCollectedMixin {
23 WTF_MAKE_NONCOPYABLE(ActiveScriptWrappable); 27 WTF_MAKE_NONCOPYABLE(ActiveScriptWrappable);
24 public: 28 public:
25 explicit ActiveScriptWrappable(ScriptWrappable*); 29 explicit ActiveScriptWrappable(ScriptWrappable*);
26 30
27 static void traceActiveScriptWrappables(ScriptWrappableVisitor*); 31 static void traceActiveScriptWrappables(v8::Isolate*, ScriptWrappableVisitor *);
28 32
29 virtual bool hasPendingActivity() const = 0; 33 virtual bool hasPendingActivity() const = 0;
30 34
31 ScriptWrappable* toScriptWrappable() const; 35 ScriptWrappable* toScriptWrappable() const { return m_scriptWrappable; }
32 36
33 private: 37 private:
34 ScriptWrappable* m_scriptWrappable; 38 ScriptWrappable* m_scriptWrappable;
35 }; 39 };
36 40
37 } // namespace blink 41 } // namespace blink
38 42
39 #endif // ActiveScriptWrappable_h 43 #endif // ActiveScriptWrappable_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698