mirror of
https://github.com/dart-lang/sdk
synced 2024-10-07 10:26:00 +00:00
[ VM / Service ] Fix crash when embedder service event is posted while
there is no current isolate Fixes issue #46612 TEST=Existing tests, manual testing Change-Id: I88e1f7185b0ccaa6dcd73ccae05935af074dcad4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221562 Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Ben Konyi <bkonyi@google.com>
This commit is contained in:
parent
64ebe56f5f
commit
9c8f51f538
|
@ -4523,7 +4523,7 @@ void Service::SendEmbedderEvent(Isolate* isolate,
|
|||
event.set_embedder_kind(event_kind);
|
||||
event.set_embedder_stream_id(stream_id);
|
||||
event.set_bytes(bytes, bytes_len);
|
||||
Service::HandleEvent(&event);
|
||||
Service::HandleEvent(&event, /*enter_safepoint=*/false);
|
||||
}
|
||||
|
||||
void Service::SendLogEvent(Isolate* isolate,
|
||||
|
|
|
@ -20,7 +20,9 @@ ServiceEvent::ServiceEvent(IsolateGroup* isolate_group, EventKind event_kind)
|
|||
: ServiceEvent(isolate_group, nullptr, event_kind) {}
|
||||
|
||||
ServiceEvent::ServiceEvent(Isolate* isolate, EventKind event_kind)
|
||||
: ServiceEvent(isolate->group(), isolate, event_kind) {}
|
||||
: ServiceEvent(isolate != nullptr ? isolate->group() : nullptr,
|
||||
isolate,
|
||||
event_kind) {}
|
||||
|
||||
ServiceEvent::ServiceEvent(IsolateGroup* isolate_group,
|
||||
Isolate* isolate,
|
||||
|
|
Loading…
Reference in a new issue