File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -366,12 +366,17 @@ void InspectorIoDelegate::MessageReceived(int session_id,
366
366
GetTargetSessionId (message);
367
367
std::shared_ptr<MainThreadHandle> worker = nullptr ;
368
368
int merged_session_id = session_id;
369
- if (!target_session_id_str->empty ()) {
370
- int target_session_id = std::stoi (*target_session_id_str);
371
- worker =
372
- protocol::TargetAgent::target_session_id_worker_map_[target_session_id];
373
- if (worker) {
374
- merged_session_id += target_session_id << 16 ;
369
+ if (target_session_id_str) {
370
+ bool is_number = std::all_of (target_session_id_str->begin (),
371
+ target_session_id_str->end (),
372
+ ::isdigit);
373
+ if (is_number) {
374
+ int target_session_id = std::stoi (*target_session_id_str);
375
+ worker = protocol::TargetAgent::target_session_id_worker_map_
376
+ [target_session_id];
377
+ if (worker) {
378
+ merged_session_id += target_session_id << 16 ;
379
+ }
375
380
}
376
381
}
377
382
You can’t perform that action at this time.
0 commit comments