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

Side by Side Diff: gin/per_isolate_data.h

Issue 2589363003: Use timer task runner for V8PerIsolate tasks (Closed)
Patch Set: One more fix Created 4 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 GIN_PER_ISOLATE_DATA_H_ 5 #ifndef GIN_PER_ISOLATE_DATA_H_
6 #define GIN_PER_ISOLATE_DATA_H_ 6 #define GIN_PER_ISOLATE_DATA_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 14 matching lines...) Expand all
25 class IndexedPropertyInterceptor; 25 class IndexedPropertyInterceptor;
26 class NamedPropertyInterceptor; 26 class NamedPropertyInterceptor;
27 class WrappableBase; 27 class WrappableBase;
28 28
29 // There is one instance of PerIsolateData per v8::Isolate managed by Gin. This 29 // There is one instance of PerIsolateData per v8::Isolate managed by Gin. This
30 // class stores all the Gin-related data that varies per isolate. 30 // class stores all the Gin-related data that varies per isolate.
31 class GIN_EXPORT PerIsolateData { 31 class GIN_EXPORT PerIsolateData {
32 public: 32 public:
33 PerIsolateData(v8::Isolate* isolate, 33 PerIsolateData(v8::Isolate* isolate,
34 v8::ArrayBuffer::Allocator* allocator, 34 v8::ArrayBuffer::Allocator* allocator,
35 IsolateHolder::AccessMode access_mode); 35 IsolateHolder::AccessMode access_mode,
36 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
36 ~PerIsolateData(); 37 ~PerIsolateData();
37 38
38 static PerIsolateData* From(v8::Isolate* isolate); 39 static PerIsolateData* From(v8::Isolate* isolate);
39 40
40 // Each isolate is associated with a collection of v8::ObjectTemplates and 41 // Each isolate is associated with a collection of v8::ObjectTemplates and
41 // v8::FunctionTemplates. Typically these template objects are created 42 // v8::FunctionTemplates. Typically these template objects are created
42 // lazily. 43 // lazily.
43 void SetObjectTemplate(WrapperInfo* info, 44 void SetObjectTemplate(WrapperInfo* info,
44 v8::Local<v8::ObjectTemplate> object_template); 45 v8::Local<v8::ObjectTemplate> object_template);
45 void SetFunctionTemplate(WrapperInfo* info, 46 void SetFunctionTemplate(WrapperInfo* info,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 NamedPropertyInterceptorMap named_interceptors_; 101 NamedPropertyInterceptorMap named_interceptors_;
101 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 102 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
102 std::unique_ptr<V8IdleTaskRunner> idle_task_runner_; 103 std::unique_ptr<V8IdleTaskRunner> idle_task_runner_;
103 104
104 DISALLOW_COPY_AND_ASSIGN(PerIsolateData); 105 DISALLOW_COPY_AND_ASSIGN(PerIsolateData);
105 }; 106 };
106 107
107 } // namespace gin 108 } // namespace gin
108 109
109 #endif // GIN_PER_ISOLATE_DATA_H_ 110 #endif // GIN_PER_ISOLATE_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698