From 2bba463f71080ea7be7e57eca8f4b0d44ce17572 Mon Sep 17 00:00:00 2001 From: Daco Harkes Date: Sat, 12 Oct 2024 07:06:31 +0000 Subject: [PATCH] [vm/ffi] Add embedder API for resolving asset ids - fix Stop swallowing error messages. TEST=Tested in the local engine build in Flutter that uses the new API. Change-Id: I179366b8d5a251bcb00b5fea722e440c2745a1c7 Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-try,pkg-mac-release-arm64-try,pkg-win-release-try,vm-ffi-android-debug-arm-try,vm-aot-linux-debug-x64-try,vm-linux-debug-x64-try,vm-win-debug-x64-try,vm-mac-debug-x64-try,vm-mac-debug-arm64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389740 Auto-Submit: Daco Harkes Commit-Queue: Martin Kustermann Reviewed-by: Martin Kustermann --- runtime/lib/ffi_dynamic_library.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/lib/ffi_dynamic_library.cc b/runtime/lib/ffi_dynamic_library.cc index 8e51bd1e3a61..5912f3fce9d9 100644 --- a/runtime/lib/ffi_dynamic_library.cc +++ b/runtime/lib/ffi_dynamic_library.cc @@ -452,7 +452,7 @@ intptr_t FfiResolveInternal(const String& asset, // Native assets resolution. void* asset_result = FfiResolveAsset(thread, asset, symbol, error); - if (asset_result != nullptr) { + if (asset_result != nullptr || *error != nullptr) { return reinterpret_cast(asset_result); }