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

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

Issue 2887013002: [inspector] Move IsolateData to a separate file (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 db94d8bd1a6e5253df095af75aef64c77434c2ad..2052c621d1c1f9fd6885d8fe7c590e06ad5dc3ad 100644
--- a/test/inspector/task-runner.h
+++ b/test/inspector/task-runner.h
@@ -15,54 +15,7 @@
#include "src/base/platform/platform.h"
#include "src/locked-queue-inl.h"
#include "src/vector.h"
-
-class TaskRunner;
-
-class IsolateData {
- public:
- 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>>;
-
- IsolateData(TaskRunner* task_runner, SetupGlobalTasks setup_global_tasks,
- v8::StartupData* startup_data);
- static IsolateData* FromContext(v8::Local<v8::Context> context);
-
- v8::Isolate* isolate() const { return isolate_; }
- TaskRunner* task_runner() const { return task_runner_; }
- int CreateContextGroup();
- v8::Local<v8::Context> GetContext(int context_group_id);
- void RegisterModule(v8::Local<v8::Context> context,
- v8::internal::Vector<uint16_t> name,
- v8::ScriptCompiler::Source* source);
-
- private:
- struct VectorCompare {
- bool operator()(const v8::internal::Vector<uint16_t>& lhs,
- const v8::internal::Vector<uint16_t>& rhs) const {
- for (int i = 0; i < lhs.length() && i < rhs.length(); ++i) {
- if (lhs[i] != rhs[i]) return lhs[i] < rhs[i];
- }
- return false;
- }
- };
- static v8::MaybeLocal<v8::Module> ModuleResolveCallback(
- v8::Local<v8::Context> context, v8::Local<v8::String> specifier,
- v8::Local<v8::Module> referrer);
-
- TaskRunner* task_runner_;
- SetupGlobalTasks setup_global_tasks_;
- v8::Isolate* isolate_;
- int last_context_group_id_ = 0;
- std::map<int, v8::Global<v8::Context>> contexts_;
- std::map<v8::internal::Vector<uint16_t>, v8::Global<v8::Module>,
- VectorCompare>
- modules_;
-};
+#include "test/inspector/isolate-data.h"
class TaskRunner : public v8::base::Thread {
public:
« 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