[ VM / Service ] Removed fixedId parameter from Isolate responses

Change-Id: I0c8c9caa78d770ebe5c57202e6bebe029774c7f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104080
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This commit is contained in:
Ben Konyi 2019-05-31 00:20:15 +00:00 committed by commit-bot@chromium.org
parent a25f927ba9
commit 2babb218d6
3 changed files with 11 additions and 2 deletions

View file

@ -2099,8 +2099,8 @@ void Isolate::PrintJSON(JSONStream* stream, bool ref) {
}
JSONObject jsobj(stream);
jsobj.AddProperty("type", (ref ? "@Isolate" : "Isolate"));
jsobj.AddFixedServiceId(ISOLATE_SERVICE_ID_FORMAT_STRING,
static_cast<int64_t>(main_port()));
jsobj.AddServiceId(ISOLATE_SERVICE_ID_FORMAT_STRING,
static_cast<int64_t>(main_port()));
jsobj.AddProperty("name", name());
jsobj.AddPropertyF("number", "%" Pd64 "", static_cast<int64_t>(main_port()));

View file

@ -500,6 +500,14 @@ void JSONObject::AddFixedServiceId(const char* format, ...) const {
va_end(args);
}
void JSONObject::AddServiceId(const char* format, ...) const {
// Add the id property.
va_list args;
va_start(args, format);
stream_->VPrintfProperty("id", format, args);
va_end(args);
}
void JSONObject::AddLocation(const Script& script,
TokenPosition token_pos,
TokenPosition end_token_pos) const {

View file

@ -307,6 +307,7 @@ class JSONObject : public ValueObject {
void AddServiceId(const Object& o) const { stream_->PrintServiceId(o); }
void AddFixedServiceId(const char* format, ...) const PRINTF_ATTRIBUTE(2, 3);
void AddServiceId(const char* format, ...) const PRINTF_ATTRIBUTE(2, 3);
void AddLocation(
const Script& script,