Enable flutter service protocol rpcs to run on UI isolate. (flutter/engine#5263)
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 https://github.com/flutter/flutter/issues/17434
This commit is contained in:
committed by
GitHub
parent
8e28688437
commit
2d74bd4c27
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user