From 6882e41a3d9fe8189232fe39f38e12f169539d32 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 7 Dec 2016 13:11:41 -0800 Subject: [PATCH] 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 --- .../flutter/shell/common/platform_view_service_protocol.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/shell/common/platform_view_service_protocol.cc b/engine/src/flutter/shell/common/platform_view_service_protocol.cc index 0e9f40da43..b54a52da8b 100644 --- a/engine/src/flutter/shell/common/platform_view_service_protocol.cc +++ b/engine/src/flutter/shell/common/platform_view_service_protocol.cc @@ -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); }