Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 3d0765e

Browse files
author
Emmanuel Garcia
committed
Clean up
1 parent 53c0304 commit 3d0765e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

runtime/dart_isolate.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,9 @@ bool DartIsolate::MarkIsolateRunnable() {
728728
static 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;

0 commit comments

Comments
 (0)