Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: runtime/vm/service.cc

Issue 2662333002: Start adding vm/cc tests for rewind functionality. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« runtime/vm/json_stream.cc ('K') | « runtime/vm/json_stream.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index bdc71e989bc89aeac33119903309465443afa505..82946b6b71198ff1f48f05ca709890e020c20171 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -840,13 +840,18 @@ void Service::InvokeMethod(Isolate* I,
ASSERT(!param_values.IsNull());
ASSERT(param_keys.Length() == param_values.Length());
- if (!reply_port.IsSendPort()) {
+ // We expect a reply port unless there is a null sequence id,
+ // which indicates that no reply should be sent. We use this in
+ // tests.
+ if (!seq.IsNull() && !reply_port.IsSendPort()) {
FATAL("SendPort expected.");
}
JSONStream js;
- js.Setup(zone.GetZone(), SendPort::Cast(reply_port).Id(), seq, method_name,
- param_keys, param_values, parameters_are_dart_objects);
+ Dart_Port reply_port_id =
+ (reply_port.IsNull() ? ILLEGAL_PORT : SendPort::Cast(reply_port).Id());
+ js.Setup(zone.GetZone(), reply_port_id, seq, method_name, param_keys,
+ param_values, parameters_are_dart_objects);
// RPC came in with a custom service id zone.
const char* id_zone_param = js.LookupParam("_idZone");
« runtime/vm/json_stream.cc ('K') | « runtime/vm/json_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698