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

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

Issue 2574803002: [inspector] add async instrumentation for setTimeout in tests (Closed)
Patch Set: addressed comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/inspector/protocol-test.js ('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 17385468bed7529b663ed317184e474f352c8a41..045bba0d259513ec9e36f891ff083723808817e0 100644
--- a/test/inspector/task-runner.h
+++ b/test/inspector/task-runner.h
@@ -67,18 +67,33 @@ class TaskRunner : public v8::base::Thread {
DISALLOW_COPY_AND_ASSIGN(TaskRunner);
};
-class ExecuteStringTask : public TaskRunner::Task {
+class AsyncTask : public TaskRunner::Task {
+ public:
+ AsyncTask(const char* task_name, v8_inspector::V8Inspector* inspector);
+ virtual ~AsyncTask() = default;
+
+ void Run(v8::Isolate* isolate,
+ const v8::Global<v8::Context>& context) override;
+ virtual void AsyncRun(v8::Isolate* isolate,
+ const v8::Global<v8::Context>& context) = 0;
+
+ private:
+ v8_inspector::V8Inspector* inspector_;
+};
+
+class ExecuteStringTask : public AsyncTask {
public:
ExecuteStringTask(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::Integer> column_offset, const char* task_name,
+ v8_inspector::V8Inspector* inspector);
explicit ExecuteStringTask(
const v8::internal::Vector<const char>& expression);
bool is_inspector_task() override { return false; }
- void Run(v8::Isolate* isolate,
- const v8::Global<v8::Context>& context) override;
+ void AsyncRun(v8::Isolate* isolate,
+ const v8::Global<v8::Context>& context) override;
private:
v8::internal::Vector<uint16_t> expression_;
« no previous file with comments | « test/inspector/protocol-test.js ('k') | test/inspector/task-runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698