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

Unified Diff: test/inspector/task-runner.h

Issue 2832723004: [test/inspector] remove any usage of v8::Extension (Closed)
Patch Set: ac Created 3 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 side-by-side diff with in-line comments
Download patch
Index: test/inspector/task-runner.h
diff --git a/test/inspector/task-runner.h b/test/inspector/task-runner.h
index 9bb135efb91095c1d53ae2e36f704702abfde536..ff86838b4b635d5afbbe598a324107600f6481a7 100644
--- a/test/inspector/task-runner.h
+++ b/test/inspector/task-runner.h
@@ -36,7 +36,15 @@ class TaskRunner : public v8::base::Thread {
const v8::Global<v8::Context>& context) = 0;
};
- TaskRunner(v8::ExtensionConfiguration* extensions, bool catch_exceptions,
+ class SetupGlobalTask {
+ public:
+ virtual ~SetupGlobalTask() = default;
+ virtual void Run(v8::Isolate* isolate,
+ v8::Local<v8::ObjectTemplate> global) = 0;
+ };
+ using SetupGlobalTasks = std::vector<std::unique_ptr<SetupGlobalTask>>;
+
+ TaskRunner(SetupGlobalTasks setup_global_tasks, bool catch_exceptions,
v8::base::Semaphore* ready_semaphore);
virtual ~TaskRunner();
@@ -52,7 +60,8 @@ class TaskRunner : public v8::base::Thread {
static TaskRunner* FromContext(v8::Local<v8::Context>);
- v8::Local<v8::Context> NewContextGroup();
+ v8::Local<v8::Context> NewContextGroup(
+ const SetupGlobalTasks& setup_global_tasks);
v8::Local<v8::Context> GetContext(int context_group_id);
static int GetContextGroupId(v8::Local<v8::Context> context);
@@ -68,7 +77,7 @@ class TaskRunner : public v8::base::Thread {
void InitializeIsolate();
Task* GetNext(bool only_protocol);
- v8::ExtensionConfiguration* extensions_;
+ SetupGlobalTasks setup_global_tasks_;
bool catch_exceptions_;
v8::base::Semaphore* ready_semaphore_;

Powered by Google App Engine
This is Rietveld 408576698