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

Issue 2980733003: Introduced support for external services registration in the ServiceProtocol (Closed)

Created:
3 years, 5 months ago by cbernaschina
Modified:
3 years, 5 months ago
Reviewers:
bkonyi, rmacnak, siva
CC:
reviews_dartlang.org, turnidge, rmacnak, zra, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Introduce external services registration A new RPC is introduced `_registerService` which allow clients to register new services that are accessible from all the other clients. Each registered endpoint is identified by 3 strings: - `service` a non empty string which identifies the provided service (e.g. `HotReload`, `OpenFile`) - `alias` an alias for that particular endpoint used by clients to identify it (e.g. `Flutter`, `IntelliJ`) - `method` __generated__ the RPC method that should be invoked from a client to request it A new _stream_ `_Service` is introduce, and two related events: - `ServiceRegistered` which is triggered when a new client is registered. All the related information (`service`, `alias`, `method`) are sent. - `ServiceUnregistered` which is triggered when a client, which previously registered a service, disconnects. Just `service` and `method` are sent. Related https://github.com/dart-lang/sdk/issues/30023 R=asiva@google.com, bkonyi@google.com Committed: https://github.com/dart-lang/sdk/commit/df8bf384eb815cf38450cb50a0f4b62230fba217

Patch Set 1 #

Patch Set 2 : Fix checked mode exceptions #

Total comments: 6

Patch Set 3 : Better tests #

Patch Set 4 : Avoid flaky test #

Patch Set 5 : Better asynchronous and out of order test #

Patch Set 6 : Use reloadSources Service by default #

Patch Set 7 : Added tests for notifications #

Patch Set 8 : Fix typos #

Total comments: 20

Patch Set 9 : Address CL comments #

Total comments: 4

Patch Set 10 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1440 lines, -223 lines) Patch
M runtime/bin/vmservice/server.dart View 1 3 chunks +20 lines, -15 lines 0 comments Download
M runtime/observatory/.packages View 1 chunk +1 line, -1 line 0 comments Download
M runtime/observatory/lib/event.dart View 2 chunks +31 lines, -0 lines 0 comments Download
M runtime/observatory/lib/models.dart View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/observatory/lib/src/app/application.dart View 2 chunks +7 lines, -5 lines 0 comments Download
M runtime/observatory/lib/src/app/page.dart View 3 chunks +3 lines, -4 lines 0 comments Download
M runtime/observatory/lib/src/elements/css/shared.css View 1 2 3 4 5 6 7 8 2 chunks +33 lines, -1 line 0 comments Download
M runtime/observatory/lib/src/elements/debugger.dart View 1 2 3 4 5 4 chunks +12 lines, -3 lines 0 comments Download
M runtime/observatory/lib/src/elements/helpers/nav_menu.dart View 1 chunk +1 line, -2 lines 0 comments Download
M runtime/observatory/lib/src/elements/isolate_view.dart View 3 chunks +6 lines, -4 lines 0 comments Download
A runtime/observatory/lib/src/elements/nav/reload.dart View 1 2 3 4 5 1 chunk +107 lines, -0 lines 0 comments Download
M runtime/observatory/lib/src/models/objects/event.dart View 1 chunk +15 lines, -0 lines 0 comments Download
A runtime/observatory/lib/src/models/objects/service.dart View 1 chunk +9 lines, -0 lines 0 comments Download
M runtime/observatory/lib/src/models/repositories/event.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/observatory/lib/src/models/repositories/isolate.dart View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M runtime/observatory/lib/src/repositories/event.dart View 4 chunks +13 lines, -3 lines 0 comments Download
M runtime/observatory/lib/src/repositories/isolate.dart View 1 2 3 4 5 2 chunks +19 lines, -4 lines 0 comments Download
M runtime/observatory/lib/src/service/object.dart View 1 2 8 chunks +41 lines, -1 line 0 comments Download
M runtime/observatory/observatory_sources.gypi View 2 chunks +2 lines, -0 lines 0 comments Download
M runtime/observatory/tests/observatory_ui/mocks/repositories/event.dart View 2 chunks +21 lines, -0 lines 0 comments Download
M runtime/observatory/tests/service/auth_token1_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/observatory/tests/service/auth_token_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/observatory/tests/service/developer_server_control_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
A runtime/observatory/tests/service/external_service_asynchronous_invocation_test.dart View 1 2 3 4 5 6 7 8 1 chunk +163 lines, -0 lines 0 comments Download
A runtime/observatory/tests/service/external_service_disappear_test.dart View 1 2 3 4 5 6 7 8 1 chunk +87 lines, -0 lines 0 comments Download
A runtime/observatory/tests/service/external_service_notification_invocation_test.dart View 1 2 3 4 5 6 7 8 1 chunk +80 lines, -0 lines 0 comments Download
A runtime/observatory/tests/service/external_service_registration_test.dart View 1 2 3 4 5 1 chunk +122 lines, -0 lines 0 comments Download
A runtime/observatory/tests/service/external_service_registration_via_notification_test.dart View 1 2 3 4 5 6 1 chunk +102 lines, -0 lines 0 comments Download
A runtime/observatory/tests/service/external_service_synchronous_invocation_test.dart View 1 2 3 4 5 6 7 8 1 chunk +125 lines, -0 lines 0 comments Download
D runtime/observatory/tests/service/send_object_to_editor_rpc_test.dart View 1 chunk +0 lines, -57 lines 0 comments Download
M runtime/vm/service.h View 1 chunk +0 lines, -1 line 0 comments Download
M runtime/vm/service.cc View 3 chunks +5 lines, -45 lines 0 comments Download
M runtime/vm/service_event.h View 4 chunks +0 lines, -12 lines 0 comments Download
M runtime/vm/service_event.cc View 3 chunks +0 lines, -11 lines 0 comments Download
M sdk/lib/vmservice/client.dart View 1 2 3 4 5 6 7 8 9 2 chunks +32 lines, -12 lines 0 comments Download
M sdk/lib/vmservice/message.dart View 6 chunks +91 lines, -4 lines 0 comments Download
M sdk/lib/vmservice/message_router.dart View 1 chunk +2 lines, -1 line 0 comments Download
A sdk/lib/vmservice/named_lookup.dart View 1 2 3 4 5 1 chunk +69 lines, -0 lines 0 comments Download
M sdk/lib/vmservice/running_isolate.dart View 1 chunk +3 lines, -1 line 0 comments Download
M sdk/lib/vmservice/running_isolates.dart View 2 chunks +4 lines, -2 lines 0 comments Download
M sdk/lib/vmservice/vmservice.dart View 1 2 3 4 5 6 7 8 11 chunks +201 lines, -27 lines 0 comments Download
M sdk/lib/vmservice/vmservice_sources.gypi View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 19 (5 generated)
cbernaschina
3 years, 5 months ago (2017-07-12 17:09:27 UTC) #3
cbernaschina
3 years, 5 months ago (2017-07-12 23:36:11 UTC) #5
siva
lgtm https://codereview.chromium.org/2980733003/diff/20001/runtime/observatory/lib/src/elements/nav/reload.dart File runtime/observatory/lib/src/elements/nav/reload.dart (right): https://codereview.chromium.org/2980733003/diff/20001/runtime/observatory/lib/src/elements/nav/reload.dart#newcode1 runtime/observatory/lib/src/elements/nav/reload.dart:1: // Copyright (c) 2016, the Dart project authors. ...
3 years, 5 months ago (2017-07-13 01:07:40 UTC) #6
cbernaschina
https://codereview.chromium.org/2980733003/diff/20001/runtime/observatory/lib/src/elements/nav/reload.dart File runtime/observatory/lib/src/elements/nav/reload.dart (right): https://codereview.chromium.org/2980733003/diff/20001/runtime/observatory/lib/src/elements/nav/reload.dart#newcode1 runtime/observatory/lib/src/elements/nav/reload.dart:1: // Copyright (c) 2016, the Dart project authors. Please ...
3 years, 5 months ago (2017-07-13 04:10:15 UTC) #7
cbernaschina
3 years, 5 months ago (2017-07-13 17:19:21 UTC) #8
cbernaschina
3 years, 5 months ago (2017-07-13 17:58:01 UTC) #9
cbernaschina
Implemented the last changes: - Reload Sources by default uses services if available - Tests ...
3 years, 5 months ago (2017-07-13 20:55:41 UTC) #10
cbernaschina
Added tests for notification based registration and invocation of services
3 years, 5 months ago (2017-07-13 21:25:58 UTC) #11
cbernaschina
3 years, 5 months ago (2017-07-13 21:29:36 UTC) #12
bkonyi
LGTM with some minor nits. https://codereview.chromium.org/2980733003/diff/140001/runtime/observatory/.packages File runtime/observatory/.packages (right): https://codereview.chromium.org/2980733003/diff/140001/runtime/observatory/.packages#newcode1 runtime/observatory/.packages:1: # Generated by pub ...
3 years, 5 months ago (2017-07-13 23:00:45 UTC) #14
cbernaschina
https://codereview.chromium.org/2980733003/diff/140001/runtime/observatory/.packages File runtime/observatory/.packages (right): https://codereview.chromium.org/2980733003/diff/140001/runtime/observatory/.packages#newcode1 runtime/observatory/.packages:1: # Generated by pub on 2017-07-10 18:02:33.540895. On 2017/07/13 ...
3 years, 5 months ago (2017-07-13 23:32:36 UTC) #15
siva
LGTM with one comment about empty list of sources. https://codereview.chromium.org/2980733003/diff/160001/observatory_sources.gypi File observatory_sources.gypi (right): https://codereview.chromium.org/2980733003/diff/160001/observatory_sources.gypi#newcode9 observatory_sources.gypi:9: ...
3 years, 5 months ago (2017-07-14 00:56:13 UTC) #16
cbernaschina
https://codereview.chromium.org/2980733003/diff/160001/observatory_sources.gypi File observatory_sources.gypi (right): https://codereview.chromium.org/2980733003/diff/160001/observatory_sources.gypi#newcode9 observatory_sources.gypi:9: } On 2017/07/14 00:56:13, siva wrote: > empty list ...
3 years, 5 months ago (2017-07-14 01:00:11 UTC) #17
cbernaschina
3 years, 5 months ago (2017-07-14 01:19:00 UTC) #19
Message was sent while issue was closed.
Committed patchset #10 (id:180001) manually as
df8bf384eb815cf38450cb50a0f4b62230fba217 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698