Fix invalid JSON in listViews RPC response when a view does not have an isolate (flutter/engine#3295)

Fixes https://github.com/flutter/flutter/issues/7174
This commit is contained in:
Jason Simmons
2016-12-07 13:11:41 -08:00
committed by GitHub
parent 016cc947c8
commit 6882e41a3d

View File

@@ -103,10 +103,10 @@ static void AppendFlutterView(std::stringstream* stream,
int64_t isolate_id,
const std::string isolate_name) {
*stream << "{\"type\":\"FlutterView\", \"id\": \"" << kViewIdPrefx << "0x"
<< std::hex << view_id << std::dec;
<< std::hex << view_id << std::dec << "\"";
if (isolate_id != ILLEGAL_PORT) {
// Append the isolate (if it exists).
*stream << "\","
*stream << ","
<< "\"isolate\":";
AppendIsolateRef(stream, isolate_id, isolate_name);
}