This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -728,8 +728,9 @@ bool DartIsolate::MarkIsolateRunnable() {
728728static void InvokeDartPluginRegistrantIfAvailable (Dart_Handle library_handle) {
729729 TRACE_EVENT0 (" flutter" , " InvokeDartPluginRegistrantIfAvailable" );
730730
731- // The Dart plugin registrant is a static with signature `void register()`
732- // within the class `_PluginRegistrant` generated by the Flutter tool.
731+ // The Dart plugin registrant is a static method with signature `void
732+ // register()` within the class `_PluginRegistrant` generated by the Flutter
733+ // tool.
733734 //
734735 // This method binds a plugin implementation to their platform
735736 // interface based on the configuration of the app's pubpec.yaml, and the
@@ -767,11 +768,13 @@ bool DartIsolate::RunFromLibrary(std::optional<std::string> library_name,
767768 auto entrypoint_handle = entrypoint.has_value () && !entrypoint.value ().empty ()
768769 ? tonic::ToDart (entrypoint.value ().c_str ())
769770 : tonic::ToDart (" main" );
770- auto entrypoint_args = tonic::ToDart (args);
771+
772+ InvokeDartPluginRegistrantIfAvailable (library_handle);
773+
771774 auto user_entrypoint_function =
772775 ::Dart_GetField (library_handle, entrypoint_handle);
773776
774- InvokeDartPluginRegistrantIfAvailable (library_handle );
777+ auto entrypoint_args = tonic::ToDart (args );
775778
776779 if (!InvokeMainEntrypoint (user_entrypoint_function, entrypoint_args)) {
777780 return false ;
You can’t perform that action at this time.
0 commit comments