Skip to content

Commit

Permalink
Enable flutter service protocol rpcs to run on UI isolate. (flutter#5263
Browse files Browse the repository at this point in the history
)

With this change if flutter tools provides isolateId parameter, then VM will run the handler on that isolate. If no isolateId is provided, VM will continue running handlers as if they were registered wit Dart_RegisterRootServiceRequestCallback.

This goes towards fixing flutter#17434
  • Loading branch information
aam committed May 16, 2018
1 parent 4dc0183 commit bbfe593
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/service_protocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void ServiceProtocol::RemoveHandler(Handler* handler) {

void ServiceProtocol::ToggleHooks(bool set) {
for (const auto& endpoint : endpoints_) {
Dart_RegisterRootServiceRequestCallback(
Dart_RegisterIsolateServiceRequestCallback(
endpoint.data(), // method
&ServiceProtocol::HandleMessage, // callback
set ? this : nullptr // user data
Expand Down

0 comments on commit bbfe593

Please sign in to comment.