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

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

Issue 2901523003: [inspector] Cleanup inspector test (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/isolate-data.cc ('k') | test/inspector/task-runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/inspector/task-runner.h
diff --git a/test/inspector/task-runner.h b/test/inspector/task-runner.h
index a399633e94bdc7a07afc07cdccb772ec738e9a37..353c78326d1a505046ac75c214a5c84e40036494 100644
--- a/test/inspector/task-runner.h
+++ b/test/inspector/task-runner.h
@@ -22,26 +22,13 @@ class TaskRunner : public v8::base::Thread {
class Task {
public:
virtual ~Task() {}
- virtual bool is_inspector_task() = 0;
- void RunOnIsolate(IsolateData* data) {
- data_ = data;
- Run();
- data_ = nullptr;
- }
-
- protected:
- virtual void Run() = 0;
- v8::Isolate* isolate() const { return data_->isolate(); }
- IsolateData* data() const { return data_; }
-
- private:
- IsolateData* data_ = nullptr;
+ virtual bool is_priority_task() = 0;
+ virtual void Run(IsolateData* data) = 0;
};
TaskRunner(IsolateData::SetupGlobalTasks setup_global_tasks,
bool catch_exceptions, v8::base::Semaphore* ready_semaphore,
- v8::StartupData* startup_data,
- IsolateData::FrontendChannel* channel);
+ v8::StartupData* startup_data, bool with_inspector);
virtual ~TaskRunner();
IsolateData* data() const { return data_.get(); }
@@ -63,7 +50,7 @@ class TaskRunner : public v8::base::Thread {
IsolateData::SetupGlobalTasks setup_global_tasks_;
v8::StartupData* startup_data_;
- IsolateData::FrontendChannel* channel_;
+ bool with_inspector_;
bool catch_exceptions_;
v8::base::Semaphore* ready_semaphore_;
std::unique_ptr<IsolateData> data_;
@@ -82,43 +69,4 @@ class TaskRunner : public v8::base::Thread {
DISALLOW_COPY_AND_ASSIGN(TaskRunner);
};
-class AsyncTask : public TaskRunner::Task {
- public:
- AsyncTask(IsolateData* data, const char* task_name);
- virtual ~AsyncTask() = default;
-
- protected:
- virtual void AsyncRun() = 0;
- void Run() override;
-
- bool instrumenting_;
-};
-
-class ExecuteStringTask : public AsyncTask {
- public:
- ExecuteStringTask(IsolateData* data, int context_group_id,
- const char* task_name,
- const v8::internal::Vector<uint16_t>& expression,
- v8::Local<v8::String> name,
- v8::Local<v8::Integer> line_offset,
- v8::Local<v8::Integer> column_offset,
- v8::Local<v8::Boolean> is_module);
- ExecuteStringTask(const v8::internal::Vector<const char>& expression,
- int context_group_id);
- bool is_inspector_task() override { return false; }
-
- private:
- void AsyncRun() override;
-
- v8::internal::Vector<uint16_t> expression_;
- v8::internal::Vector<const char> expression_utf8_;
- v8::internal::Vector<uint16_t> name_;
- int32_t line_offset_ = 0;
- int32_t column_offset_ = 0;
- bool is_module_ = false;
- int context_group_id_;
-
- DISALLOW_COPY_AND_ASSIGN(ExecuteStringTask);
-};
-
#endif // V8_TEST_INSPECTOR_PROTOCOL_TASK_RUNNER_H_
« no previous file with comments | « test/inspector/isolate-data.cc ('k') | test/inspector/task-runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698