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

Unified Diff: test/inspector/inspector-test.cc

Issue 2885253002: [inspector] Extract IsolateData out of TaskRunner (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/inspector/inspector-impl.cc ('k') | test/inspector/task-runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/inspector/inspector-test.cc
diff --git a/test/inspector/inspector-test.cc b/test/inspector/inspector-test.cc
index a3f42ede878df06f530d65f04cd7011c78a69a76..f8e96ed90b2dbdf838e19490a68c66b244e64c70 100644
--- a/test/inspector/inspector-test.cc
+++ b/test/inspector/inspector-test.cc
@@ -51,7 +51,7 @@ v8::Local<v8::String> ToV8String(v8::Isolate* isolate, const char* str) {
.ToLocalChecked();
}
-class UtilsExtension : public TaskRunner::SetupGlobalTask {
+class UtilsExtension : public IsolateData::SetupGlobalTask {
public:
~UtilsExtension() override = default;
void Run(v8::Isolate* isolate,
@@ -191,7 +191,8 @@ class UtilsExtension : public TaskRunner::SetupGlobalTask {
v8::Isolate* isolate = args.GetIsolate();
if (ReadFile(isolate, args[0], &chars)) {
ExecuteStringTask(chars).RunOnTaskRunner(
- TaskRunner::FromContext(isolate->GetCurrentContext()));
+ IsolateData::FromContext(isolate->GetCurrentContext())
+ ->task_runner());
}
}
@@ -317,7 +318,7 @@ class SetTimeoutTask : public AsyncTask {
v8::Global<v8::Function> function_;
};
-class SetTimeoutExtension : public TaskRunner::SetupGlobalTask {
+class SetTimeoutExtension : public IsolateData::SetupGlobalTask {
public:
void Run(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> global) override {
@@ -350,7 +351,7 @@ class SetTimeoutExtension : public TaskRunner::SetupGlobalTask {
v8::Integer::New(isolate, 0), v8::Integer::New(isolate, 0),
v8::Boolean::New(isolate, false), "setTimeout", inspector));
}
- TaskRunner::FromContext(context)->Append(task.release());
+ IsolateData::FromContext(context)->task_runner()->Append(task.release());
}
};
@@ -361,7 +362,7 @@ bool StrictAccessCheck(v8::Local<v8::Context> accessing_context,
return accessing_context.IsEmpty();
}
-class InspectorExtension : public TaskRunner::SetupGlobalTask {
+class InspectorExtension : public IsolateData::SetupGlobalTask {
public:
~InspectorExtension() override = default;
void Run(v8::Isolate* isolate,
@@ -531,7 +532,7 @@ void UtilsExtension::CreateContextGroup(
}
v8::base::Semaphore ready_semaphore(0);
int context_group_id = 0;
- TaskRunner::SetupGlobalTasks setup_global;
+ IsolateData::SetupGlobalTasks setup_global;
setup_global.emplace_back(new SetTimeoutExtension());
setup_global.emplace_back(new InspectorExtension());
inspector_client_->scheduleCreateContextGroup(
@@ -609,7 +610,7 @@ int main(int argc, char* argv[]) {
}
}
- TaskRunner::SetupGlobalTasks backend_extensions;
+ IsolateData::SetupGlobalTasks backend_extensions;
backend_extensions.emplace_back(new SetTimeoutExtension());
backend_extensions.emplace_back(new InspectorExtension());
TaskRunner backend_runner(std::move(backend_extensions), false,
@@ -619,7 +620,7 @@ int main(int argc, char* argv[]) {
SendMessageToBackendExtension::set_backend_task_runner(&backend_runner);
UtilsExtension::set_backend_task_runner(&backend_runner);
- TaskRunner::SetupGlobalTasks frontend_extensions;
+ IsolateData::SetupGlobalTasks frontend_extensions;
frontend_extensions.emplace_back(new UtilsExtension());
frontend_extensions.emplace_back(new SendMessageToBackendExtension());
TaskRunner frontend_runner(std::move(frontend_extensions), true,
« no previous file with comments | « test/inspector/inspector-impl.cc ('k') | test/inspector/task-runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698