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

Commit 9a97d9a

Browse files
committed
Address comments, fix playstoredynamicfeaturemanager:
1 parent 49feed1 commit 9a97d9a

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

runtime/dart_isolate.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ bool DartIsolate::Initialize(Dart_Isolate dart_isolate) {
320320
return false;
321321
}
322322

323-
Dart_SetDeferredLoadHandler(OnDartLoadLibrary);
323+
tonic::LogIfError(Dart_SetDeferredLoadHandler(OnDartLoadLibrary));
324324

325325
if (!UpdateThreadPoolNames()) {
326326
return false;
@@ -340,8 +340,7 @@ bool DartIsolate::LoadLoadingUnit(intptr_t loading_unit_id,
340340
tonic::DartState::Scope scope(this);
341341
Dart_Handle result = Dart_DeferredLoadComplete(loading_unit_id, snapshot_data,
342342
snapshot_instructions);
343-
if (Dart_IsApiError(result)) {
344-
FML_LOG(ERROR) << "LOADING FAILED " << loading_unit_id;
343+
if (tonic::LogIfError(result)) {
345344
result =
346345
Dart_DeferredLoadCompleteError(loading_unit_id, Dart_GetError(result),
347346
/*transient*/ true);

shell/platform/android/io/flutter/embedding/engine/dynamicfeatures/PlayStoreDynamicFeatureManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,13 @@ private String loadingUnitIdToModuleName(int loadingUnitId) {
195195

196196
public void downloadDynamicFeature(int loadingUnitId, String moduleName) {
197197
String resolvedModuleName =
198-
moduleName == null ? moduleName : loadingUnitIdToModuleName(loadingUnitId);
198+
moduleName != null ? moduleName : loadingUnitIdToModuleName(loadingUnitId);
199199
if (resolvedModuleName == null) {
200200
Log.d(TAG, "Dynamic feature module name was null.");
201201
return;
202202
}
203203

204-
SplitInstallRequest request = SplitInstallRequest.newBuilder().addModule(moduleName).build();
204+
SplitInstallRequest request = SplitInstallRequest.newBuilder().addModule(resolvedModuleName).build();
205205

206206
splitInstallManager
207207
// Submits the request to install the module through the
@@ -212,7 +212,7 @@ public void downloadDynamicFeature(int loadingUnitId, String moduleName) {
212212
// install which is handled in FeatureInstallStateUpdatedListener.
213213
.addOnSuccessListener(
214214
sessionId -> {
215-
this.sessionIdToName.put(sessionId, moduleName);
215+
this.sessionIdToName.put(sessionId, resolvedModuleName);
216216
this.sessionIdToLoadingUnitId.put(sessionId, loadingUnitId);
217217
})
218218
.addOnFailureListener(

0 commit comments

Comments
 (0)