File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ class AppInspector implements AppInspectorInterface {
115115 await DartUri .initialize ();
116116 DartUri .recordAbsoluteUris (libraries.map ((lib) => lib.uri).nonNulls);
117117 DartUri .recordAbsoluteUris (scripts.map ((script) => script.uri).nonNulls);
118+ await getExtensionRpcs ();
118119 }
119120
120121 static IsolateRef _toIsolateRef (Isolate isolate) => IsolateRef (
@@ -787,7 +788,7 @@ class AppInspector implements AppInspectorInterface {
787788 s,
788789 );
789790 }
790- isolate.extensionRPCs = List <String >.from (extensionRpcs);
791+ isolate.extensionRPCs = List <String >.of (extensionRpcs);
791792 return extensionRpcs;
792793 }
793794
Original file line number Diff line number Diff line change @@ -509,7 +509,7 @@ class ChromeProxyService implements VmServiceInterface {
509509 v is String ? v : jsonEncode (v),
510510 ),
511511 );
512- if ((await inspector.getExtensionRpcs ()).contains (method) != true ) {
512+ if (! (await inspector.getExtensionRpcs ()).contains (method)) {
513513 throw RPCError (
514514 method,
515515 RPCErrorKind .kMethodNotFound.code,
Original file line number Diff line number Diff line change @@ -298,6 +298,20 @@ void runTests({
298298 ),
299299 },
300300 );
301+
302+ test ('not found' , () async {
303+ final serviceMethod = 'ext.test.missingServiceExtension' ;
304+ expect (
305+ service.callServiceExtension (serviceMethod),
306+ throwsA (
307+ predicate (
308+ (dynamic error) =>
309+ error is RPCError &&
310+ error.code == RPCErrorKind .kMethodNotFound.code,
311+ ),
312+ ),
313+ );
314+ });
301315 });
302316
303317 group ('VMTimeline' , () {
You can’t perform that action at this time.
0 commit comments