@@ -11,7 +11,7 @@ namespace {
11
11
class WorkerStartedRequest : public Request {
12
12
public:
13
13
WorkerStartedRequest (
14
- int id,
14
+ uint64_t id,
15
15
const std::string& url,
16
16
std::shared_ptr<node::inspector::MainThreadHandle> worker_thread,
17
17
bool waiting)
@@ -28,7 +28,7 @@ class WorkerStartedRequest : public Request {
28
28
return " Worker " + std::to_string (id);
29
29
}
30
30
31
- int id_;
31
+ uint64_t id_;
32
32
WorkerInfo info_;
33
33
bool waiting_;
34
34
};
@@ -42,22 +42,25 @@ void Report(const std::unique_ptr<WorkerDelegate>& delegate,
42
42
43
43
class WorkerFinishedRequest : public Request {
44
44
public:
45
- explicit WorkerFinishedRequest (int worker_id) : worker_id_(worker_id) {}
45
+ explicit WorkerFinishedRequest (uint64_t worker_id) : worker_id_(worker_id) {}
46
46
47
47
void Call (MainThreadInterface* thread) override {
48
48
thread->inspector_agent ()->GetWorkerManager ()->WorkerFinished (worker_id_);
49
49
}
50
50
51
51
private:
52
- int worker_id_;
52
+ uint64_t worker_id_;
53
53
};
54
54
} // namespace
55
55
56
-
57
56
ParentInspectorHandle::ParentInspectorHandle (
58
- int id, const std::string& url,
59
- std::shared_ptr<MainThreadHandle> parent_thread, bool wait_for_connect)
60
- : id_(id), url_(url), parent_thread_(parent_thread),
57
+ uint64_t id,
58
+ const std::string& url,
59
+ std::shared_ptr<MainThreadHandle> parent_thread,
60
+ bool wait_for_connect)
61
+ : id_(id),
62
+ url_(url),
63
+ parent_thread_(parent_thread),
61
64
wait_(wait_for_connect) {}
62
65
63
66
ParentInspectorHandle::~ParentInspectorHandle () {
@@ -78,11 +81,11 @@ std::unique_ptr<inspector::InspectorSession> ParentInspectorHandle::Connect(
78
81
return parent_thread_->Connect (std::move (delegate), prevent_shutdown);
79
82
}
80
83
81
- void WorkerManager::WorkerFinished (int session_id) {
84
+ void WorkerManager::WorkerFinished (uint64_t session_id) {
82
85
children_.erase (session_id);
83
86
}
84
87
85
- void WorkerManager::WorkerStarted (int session_id,
88
+ void WorkerManager::WorkerStarted (uint64_t session_id,
86
89
const WorkerInfo& info,
87
90
bool waiting) {
88
91
if (info.worker_thread ->Expired ())
@@ -93,8 +96,8 @@ void WorkerManager::WorkerStarted(int session_id,
93
96
}
94
97
}
95
98
96
- std::unique_ptr<ParentInspectorHandle>
97
- WorkerManager::NewParentHandle ( int thread_id, const std::string& url) {
99
+ std::unique_ptr<ParentInspectorHandle> WorkerManager::NewParentHandle (
100
+ uint64_t thread_id, const std::string& url) {
98
101
bool wait = !delegates_waiting_on_start_.empty ();
99
102
return std::make_unique<ParentInspectorHandle>(thread_id, url, thread_, wait );
100
103
}
0 commit comments