Version 2.16.0-50.0.dev

Merge commit '7d39d2dd514ebe481598c6344893df70263a3a12' into 'dev'
diff --git a/pkg/dds/lib/src/client.dart b/pkg/dds/lib/src/client.dart
index 29ff4bc..771ccee 100644
--- a/pkg/dds/lib/src/client.dart
+++ b/pkg/dds/lib/src/client.dart
@@ -97,13 +97,7 @@
   void _registerJsonRpcMethods() {
     _clientPeer.registerMethod('streamListen', (parameters) async {
       final streamId = parameters['streamId'].asString;
-      final includePrivates =
-          parameters['_includePrivateMembers'].asBoolOr(false);
-      await dds.streamManager.streamListen(
-        this,
-        streamId,
-        includePrivates: includePrivates,
-      );
+      await dds.streamManager.streamListen(this, streamId);
       return RPCResponses.success;
     });
 
diff --git a/pkg/dds/lib/src/stream_manager.dart b/pkg/dds/lib/src/stream_manager.dart
index 1875117..46e22cf 100644
--- a/pkg/dds/lib/src/stream_manager.dart
+++ b/pkg/dds/lib/src/stream_manager.dart
@@ -146,19 +146,16 @@
   /// `streamListen` request for `stream` to the VM service.
   Future<void> streamListen(
     DartDevelopmentServiceClient? client,
-    String stream, {
-    bool? includePrivates,
-  }) async {
+    String stream,
+  ) async {
     await _mutex.runGuarded(
       () async {
         assert(stream.isNotEmpty);
-        bool streamNewlySubscribed = false;
         if (!streamListeners.containsKey(stream)) {
           // Initialize the list of clients for the new stream before we do
           // anything else to ensure multiple clients registering for the same
           // stream in quick succession doesn't result in multiple streamListen
           // requests being sent to the VM service.
-          streamNewlySubscribed = true;
           streamListeners[stream] = <DartDevelopmentServiceClient>[];
           if ((stream == kDebugStream && client == null) ||
               stream != kDebugStream) {
@@ -167,17 +164,12 @@
             final result =
                 await dds.vmServiceClient.sendRequest('streamListen', {
               'streamId': stream,
-              if (includePrivates != null)
-                '_includePrivateMembers': includePrivates,
             });
             assert(result['type'] == 'Success');
           }
         }
         if (streamListeners[stream]!.contains(client)) {
           throw kStreamAlreadySubscribedException;
-        } else if (!streamNewlySubscribed && includePrivates != null) {
-          await dds.vmServiceClient.sendRequest('_setStreamIncludePrivateMembers',
-              {'streamId': stream, 'includePrivateMembers': includePrivates});
         }
         if (client != null) {
           streamListeners[stream]!.add(client);
diff --git a/runtime/lib/vmservice.cc b/runtime/lib/vmservice.cc
index f0eb4ce..f3dba9a 100644
--- a/runtime/lib/vmservice.cc
+++ b/runtime/lib/vmservice.cc
@@ -128,13 +128,10 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(VMService_ListenStream, 0, 2) {
+DEFINE_NATIVE_ENTRY(VMService_ListenStream, 0, 1) {
 #ifndef PRODUCT
   GET_NON_NULL_NATIVE_ARGUMENT(String, stream_id, arguments->NativeArgAt(0));
-  GET_NON_NULL_NATIVE_ARGUMENT(Bool, include_privates,
-                               arguments->NativeArgAt(1));
-  bool result =
-      Service::ListenStream(stream_id.ToCString(), include_privates.value());
+  bool result = Service::ListenStream(stream_id.ToCString());
   return Bool::Get(result).ptr();
 #else
   return Object::null();
diff --git a/runtime/observatory/lib/service_common.dart b/runtime/observatory/lib/service_common.dart
index 5c62c48..236343c 100644
--- a/runtime/observatory/lib/service_common.dart
+++ b/runtime/observatory/lib/service_common.dart
@@ -149,11 +149,7 @@
       return new Future.error(exception);
     }
     String serial = (_requestSerial++).toString();
-    var request = new _WebSocketRequest(method, <String, dynamic>{
-      ...params,
-      // Include internal response data.
-      '_includePrivateMembers': true,
-    });
+    var request = new _WebSocketRequest(method, params);
     if ((_webSocket != null) && _webSocket!.isOpen) {
       // Already connected, send request immediately.
       _sendRequest(serial, request);
diff --git a/runtime/observatory_2/lib/service_common.dart b/runtime/observatory_2/lib/service_common.dart
index d6eba9b..b61f4a0 100644
--- a/runtime/observatory_2/lib/service_common.dart
+++ b/runtime/observatory_2/lib/service_common.dart
@@ -149,11 +149,7 @@
       return new Future.error(exception);
     }
     String serial = (_requestSerial++).toString();
-    var request = new _WebSocketRequest(method, <String, dynamic>{
-      ...params,
-      // Include internal response data.
-      '_includePrivateMembers': true,
-    });
+    var request = new _WebSocketRequest(method, params);
     if ((_webSocket != null) && _webSocket.isOpen) {
       // Already connected, send request immediately.
       _sendRequest(serial, request);
diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h
index 339318e..46b44a3 100644
--- a/runtime/vm/bootstrap_natives.h
+++ b/runtime/vm/bootstrap_natives.h
@@ -362,7 +362,7 @@
   V(VMService_OnStart, 0)                                                      \
   V(VMService_OnExit, 0)                                                       \
   V(VMService_OnServerAddressChange, 1)                                        \
-  V(VMService_ListenStream, 2)                                                 \
+  V(VMService_ListenStream, 1)                                                 \
   V(VMService_CancelStream, 1)                                                 \
   V(VMService_RequestAssets, 0)                                                \
   V(VMService_DecodeAssets, 1)                                                 \
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
index fa00c67..01b6c5f 100644
--- a/runtime/vm/json_stream.cc
+++ b/runtime/vm/json_stream.cc
@@ -37,9 +37,7 @@
       param_values_(NULL),
       num_params_(0),
       offset_(0),
-      count_(-1),
-      include_private_members_(true),
-      ignore_object_depth_(0) {
+      count_(-1) {
   ObjectIdRing* ring = NULL;
   Isolate* isolate = Isolate::Current();
   if (isolate != NULL) {
@@ -92,10 +90,6 @@
                  "request %s\n",
                  Dart::UptimeMillis(), main_port, isolate_name, method_);
   }
-  const char* kIncludePrivateMembersKey = "_includePrivateMembers";
-  if (HasParam(kIncludePrivateMembersKey)) {
-    include_private_members_ = ParamIs(kIncludePrivateMembersKey, "true");
-  }
   buffer()->Printf("{\"jsonrpc\":\"2.0\", \"result\":");
 }
 
@@ -374,61 +368,49 @@
   PrintProperty("id", id_zone_->GetServiceId(o));
 }
 
-#define PRIVATE_NAME_CHECK()                                                   \
-  if (!IsAllowableKey(name) || ignore_object_depth_ > 0) return
-
 void JSONStream::PrintProperty(const char* name, const ServiceEvent* event) {
-  PRIVATE_NAME_CHECK();
   PrintPropertyName(name);
   PrintValue(event);
 }
 
 void JSONStream::PrintProperty(const char* name, Breakpoint* bpt) {
-  PRIVATE_NAME_CHECK();
   PrintPropertyName(name);
   PrintValue(bpt);
 }
 
 void JSONStream::PrintProperty(const char* name, TokenPosition tp) {
-  PRIVATE_NAME_CHECK();
   PrintPropertyName(name);
   PrintValue(tp);
 }
 
 void JSONStream::PrintProperty(const char* name, Metric* metric) {
-  PRIVATE_NAME_CHECK();
   PrintPropertyName(name);
   PrintValue(metric);
 }
 
 void JSONStream::PrintProperty(const char* name, MessageQueue* queue) {
-  PRIVATE_NAME_CHECK();
   PrintPropertyName(name);
   PrintValue(queue);
 }
 
 void JSONStream::PrintProperty(const char* name, Isolate* isolate) {
-  PRIVATE_NAME_CHECK();
   PrintPropertyName(name);
   PrintValue(isolate);
 }
 
 void JSONStream::PrintProperty(const char* name,
                                const TimelineEvent* timeline_event) {
-  PRIVATE_NAME_CHECK();
   PrintPropertyName(name);
   PrintValue(timeline_event);
 }
 
 void JSONStream::PrintProperty(const char* name,
                                const TimelineEventBlock* timeline_event_block) {
-  PRIVATE_NAME_CHECK();
   PrintPropertyName(name);
   PrintValue(timeline_event_block);
 }
 
 void JSONStream::PrintfProperty(const char* name, const char* format, ...) {
-  PRIVATE_NAME_CHECK();
   va_list args;
   va_start(args, format);
   writer_.VPrintfProperty(name, format, args);
@@ -480,13 +462,11 @@
 }
 
 void JSONStream::PrintProperty(const char* name, const Object& o, bool ref) {
-  PRIVATE_NAME_CHECK();
   PrintPropertyName(name);
   PrintValue(o, ref);
 }
 
 void JSONStream::PrintPropertyVM(const char* name, bool ref) {
-  PRIVATE_NAME_CHECK();
   PrintPropertyName(name);
   PrintValueVM(ref);
 }
diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h
index 5b37379..a00f266 100644
--- a/runtime/vm/json_stream.h
+++ b/runtime/vm/json_stream.h
@@ -9,7 +9,6 @@
 #include "platform/allocation.h"
 #include "platform/text_buffer.h"
 #include "vm/json_writer.h"
-#include "vm/os.h"
 #include "vm/service.h"
 #include "vm/token_position.h"
 
@@ -103,18 +102,6 @@
 
   void set_reply_port(Dart_Port port);
 
-  bool include_private_members() const { return include_private_members_; }
-  void set_include_private_members(bool include_private_members) {
-    include_private_members_ = include_private_members;
-  }
-
-  bool IsAllowableKey(const char* key) {
-    if (include_private_members_) {
-      return true;
-    }
-    return *key != '_';
-  }
-
   void SetParams(const char** param_keys,
                  const char** param_values,
                  intptr_t num_params);
@@ -180,41 +167,15 @@
   void PostNullReply(Dart_Port port);
 
   void OpenObject(const char* property_name = NULL) {
-    if (ignore_object_depth_ > 0 ||
-        (property_name != nullptr && !IsAllowableKey(property_name))) {
-      ignore_object_depth_++;
-      return;
-    }
     writer_.OpenObject(property_name);
   }
-  void CloseObject() {
-    if (ignore_object_depth_ > 0) {
-      ignore_object_depth_--;
-      return;
-    }
-    writer_.CloseObject();
-  }
-  void UncloseObject() {
-    // This should be updated to handle unclosing a private object if we need
-    // to handle that case, which we don't currently.
-    writer_.UncloseObject();
-  }
+  void CloseObject() { writer_.CloseObject(); }
+  void UncloseObject() { writer_.UncloseObject(); }
 
   void OpenArray(const char* property_name = NULL) {
-    if (ignore_object_depth_ > 0 ||
-        (property_name != nullptr && !IsAllowableKey(property_name))) {
-      ignore_object_depth_++;
-      return;
-    }
     writer_.OpenArray(property_name);
   }
-  void CloseArray() {
-    if (ignore_object_depth_ > 0) {
-      ignore_object_depth_--;
-      return;
-    }
-    writer_.CloseArray();
-  }
+  void CloseArray() { writer_.CloseArray(); }
 
   void PrintValueNull() { writer_.PrintValueNull(); }
   void PrintValueBool(bool b) { writer_.PrintValueBool(b); }
@@ -250,67 +211,46 @@
 
   void PrintServiceId(const Object& o);
 
-#define PRIVATE_NAME_CHECK()                                                   \
-  if (!IsAllowableKey(name) || ignore_object_depth_ > 0) {                     \
-    return;                                                                    \
-  }
-
   void PrintPropertyBool(const char* name, bool b) {
-    PRIVATE_NAME_CHECK();
     writer_.PrintPropertyBool(name, b);
   }
   void PrintProperty(const char* name, intptr_t i) {
-    PRIVATE_NAME_CHECK();
     writer_.PrintProperty(name, i);
   }
   void PrintProperty64(const char* name, int64_t i) {
-    PRIVATE_NAME_CHECK();
     writer_.PrintProperty64(name, i);
   }
   void PrintPropertyTimeMillis(const char* name, int64_t millis) {
-    PRIVATE_NAME_CHECK();
     writer_.PrintProperty64(name, millis);
   }
   void PrintPropertyTimeMicros(const char* name, int64_t micros) {
-    PRIVATE_NAME_CHECK();
     writer_.PrintProperty64(name, micros);
   }
   void PrintProperty(const char* name, double d) {
-    PRIVATE_NAME_CHECK();
     writer_.PrintProperty(name, d);
   }
   void PrintPropertyBase64(const char* name,
                            const uint8_t* bytes,
                            intptr_t length) {
-    PRIVATE_NAME_CHECK();
     writer_.PrintPropertyBase64(name, bytes, length);
   }
   void PrintProperty(const char* name, const char* s) {
-    PRIVATE_NAME_CHECK();
     writer_.PrintProperty(name, s);
   }
   bool PrintPropertyStr(const char* name,
                         const String& s,
                         intptr_t offset,
                         intptr_t count) {
-    if (!IsAllowableKey(name)) {
-      return false;
-    }
     return writer_.PrintPropertyStr(name, s, offset, count);
   }
   void PrintPropertyNoEscape(const char* name, const char* s) {
-    PRIVATE_NAME_CHECK();
     writer_.PrintPropertyNoEscape(name, s);
   }
   void PrintfProperty(const char* name, const char* format, ...)
       PRINTF_ATTRIBUTE(3, 4);
   void VPrintfProperty(const char* name, const char* format, va_list args) {
-    PRIVATE_NAME_CHECK();
     writer_.VPrintfProperty(name, format, args);
   }
-
-#undef PRIVATE_NAME_CHECK
-
   void PrintProperty(const char* name, const Object& o, bool ref = true);
 
   void PrintProperty(const char* name, const ServiceEvent* event);
@@ -345,8 +285,7 @@
   intptr_t offset_;
   intptr_t count_;
   int64_t setup_time_micros_;
-  bool include_private_members_;
-  intptr_t ignore_object_depth_;
+
   friend class JSONObject;
   friend class JSONArray;
   friend class TimelineEvent;
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 19e4c6c..209387d 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -367,7 +367,7 @@
     &Service::timeline_stream, &Service::profiler_stream,
 };
 
-bool Service::ListenStream(const char* stream_id, bool include_private_members) {
+bool Service::ListenStream(const char* stream_id) {
   if (FLAG_trace_service) {
     OS::PrintErr("vm-service: starting stream '%s'\n", stream_id);
   }
@@ -375,7 +375,6 @@
   for (intptr_t i = 0; i < num_streams; i++) {
     if (strcmp(stream_id, streams_[i]->id()) == 0) {
       streams_[i]->set_enabled(true);
-      streams_[i]->set_include_private_members(include_private_members);
       return true;
     }
   }
@@ -1165,7 +1164,7 @@
 }
 
 void Service::HandleEvent(ServiceEvent* event, bool enter_safepoint) {
-  if (event->stream_info() != nullptr && !event->stream_info()->enabled()) {
+  if (event->stream_info() != NULL && !event->stream_info()->enabled()) {
     if (FLAG_warn_on_pause_with_no_debugger && event->IsPause()) {
       // If we are about to pause a running program which has no
       // debugger connected, tell the user about it.
@@ -1173,7 +1172,7 @@
     }
     // Ignore events when no one is listening to the event stream.
     return;
-  } else if (event->stream_info() != nullptr &&
+  } else if (event->stream_info() != NULL &&
              FLAG_warn_on_pause_with_no_debugger && event->IsPause()) {
     ReportPauseOnConsole(event);
   }
@@ -1181,11 +1180,8 @@
     return;
   }
   JSONStream js;
-  if (event->stream_info() != nullptr) {
-    js.set_include_private_members(event->stream_info()->include_private_members());
-  }
   const char* stream_id = event->stream_id();
-  ASSERT(stream_id != nullptr);
+  ASSERT(stream_id != NULL);
   {
     JSONObject jsobj(&js);
     jsobj.AddProperty("jsonrpc", "2.0");
@@ -1499,30 +1495,6 @@
   }
 }
 
-static const MethodParameter* const set_stream_include_private_members_params[] = {
-    NO_ISOLATE_PARAMETER,
-    new BoolParameter("includePrivateMembers", true),
-    nullptr,
-};
-
-static void SetStreamIncludePrivateMembers(Thread* thread, JSONStream* js) {
-  const char* stream_id = js->LookupParam("streamId");
-  if (stream_id == nullptr) {
-    PrintMissingParamError(js, "streamId");
-    return;
-  }
-  bool include_private_members =
-      BoolParameter::Parse(js->LookupParam("includePrivateMembers"), false);
-  intptr_t num_streams = sizeof(streams_) / sizeof(streams_[0]);
-  for (intptr_t i = 0; i < num_streams; i++) {
-    if (strcmp(stream_id, streams_[i]->id()) == 0) {
-      streams_[i]->set_include_private_members(include_private_members);
-      break;
-    }
-  }
-  PrintSuccess(js);
-}
-
 static void ActOnIsolateGroup(JSONStream* js,
                               std::function<void(IsolateGroup*)> visitor) {
   const String& prefix =
@@ -5654,8 +5626,6 @@
     set_library_debuggable_params },
   { "setName", SetName,
     set_name_params },
-  { "_setStreamIncludePrivateMembers", SetStreamIncludePrivateMembers,
-    set_stream_include_private_members_params },
   { "setTraceClassAllocation", SetTraceClassAllocation,
     set_trace_class_allocation_params },
   { "setVMName", SetVMName,
diff --git a/runtime/vm/service.h b/runtime/vm/service.h
index d6ba66d..c31b191 100644
--- a/runtime/vm/service.h
+++ b/runtime/vm/service.h
@@ -68,21 +68,16 @@
 
 class StreamInfo {
  public:
-  explicit StreamInfo(const char* id)
-      : id_(id), enabled_(false), include_private_members_(false) {}
+  explicit StreamInfo(const char* id) : id_(id), enabled_(false) {}
 
   const char* id() const { return id_; }
 
   void set_enabled(bool value) { enabled_ = value; }
   bool enabled() const { return enabled_; }
 
-  void set_include_private_members(bool value) { include_private_members_ = value; }
-  bool include_private_members() const { return include_private_members_; }
-
  private:
   const char* id_;
   bool enabled_;
-  bool include_private_members_;
 };
 
 class Service : public AllStatic {
@@ -173,7 +168,7 @@
   static StreamInfo timeline_stream;
   static StreamInfo profiler_stream;
 
-  static bool ListenStream(const char* stream_id, bool include_privates);
+  static bool ListenStream(const char* stream_id);
   static void CancelStream(const char* stream_id);
 
   static ObjectPtr RequestAssets();
diff --git a/sdk/lib/vmservice/vmservice.dart b/sdk/lib/vmservice/vmservice.dart
index c5d2620..ed389a7 100644
--- a/sdk/lib/vmservice/vmservice.dart
+++ b/sdk/lib/vmservice/vmservice.dart
@@ -522,9 +522,7 @@
       return encodeRpcError(message, kStreamAlreadySubscribed);
     }
     if (!_isAnyClientSubscribed(streamId)) {
-      final includePrivates = message.params['_includePrivateMembers'] == true;
-      if (!serviceStreams.contains(streamId) &&
-          !_vmListenStream(streamId, includePrivates)) {
+      if (!serviceStreams.contains(streamId) && !_vmListenStream(streamId)) {
         return encodeRpcError(message, kInvalidParams,
             details: "streamListen: invalid 'streamId' parameter: ${streamId}");
       }
@@ -752,7 +750,7 @@
 
 /// Subscribe to a service stream.
 @pragma("vm:external-name", "VMService_ListenStream")
-external bool _vmListenStream(String streamId, bool include_privates);
+external bool _vmListenStream(String streamId);
 
 /// Cancel a subscription to a service stream.
 @pragma("vm:external-name", "VMService_CancelStream")
diff --git a/tools/VERSION b/tools/VERSION
index e24496b..076f009 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 16
 PATCH 0
-PRERELEASE 49
+PRERELEASE 50
 PRERELEASE_PATCH 0
\ No newline at end of file