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

Side by Side Diff: src/cancelable-task.h

Issue 2608163006: Abort running compiler dispatcher tasks under memory pressure (Closed)
Patch Set: updates Created 3 years, 11 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 | « src/api.cc ('k') | src/compiler-dispatcher/compiler-dispatcher.h » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project 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 V8_CANCELABLE_TASK_H_ 5 #ifndef V8_CANCELABLE_TASK_H_
6 #define V8_CANCELABLE_TASK_H_ 6 #define V8_CANCELABLE_TASK_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "include/v8-platform.h" 10 #include "include/v8-platform.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // to abort it. 127 // to abort it.
128 base::AtomicNumber<intptr_t> cancel_counter_; 128 base::AtomicNumber<intptr_t> cancel_counter_;
129 129
130 friend class CancelableTaskManager; 130 friend class CancelableTaskManager;
131 131
132 DISALLOW_COPY_AND_ASSIGN(Cancelable); 132 DISALLOW_COPY_AND_ASSIGN(Cancelable);
133 }; 133 };
134 134
135 135
136 // Multiple inheritance can be used because Task is a pure interface. 136 // Multiple inheritance can be used because Task is a pure interface.
137 class CancelableTask : public Cancelable, public Task { 137 class V8_EXPORT_PRIVATE CancelableTask : public Cancelable,
138 NON_EXPORTED_BASE(public Task) {
138 public: 139 public:
139 explicit CancelableTask(Isolate* isolate); 140 explicit CancelableTask(Isolate* isolate);
140 CancelableTask(Isolate* isolate, CancelableTaskManager* manager); 141 CancelableTask(Isolate* isolate, CancelableTaskManager* manager);
141 142
142 // Task overrides. 143 // Task overrides.
143 void Run() final { 144 void Run() final {
144 if (TryRun()) { 145 if (TryRun()) {
145 RunInternal(); 146 RunInternal();
146 } 147 }
147 } 148 }
(...skipping 28 matching lines...) Expand all
176 private: 177 private:
177 Isolate* isolate_; 178 Isolate* isolate_;
178 DISALLOW_COPY_AND_ASSIGN(CancelableIdleTask); 179 DISALLOW_COPY_AND_ASSIGN(CancelableIdleTask);
179 }; 180 };
180 181
181 182
182 } // namespace internal 183 } // namespace internal
183 } // namespace v8 184 } // namespace v8
184 185
185 #endif // V8_CANCELABLE_TASK_H_ 186 #endif // V8_CANCELABLE_TASK_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/compiler-dispatcher/compiler-dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698