forked from firka/flutter
Revert "Hold a global reference to the AssetManager Java object backing the APKAssetProvider (#5078)" (flutter/engine#5116)
This reverts commit c2b081e229.
It causes engine crashes in some Android Espresso tests.
This commit is contained in:
@@ -10,8 +10,7 @@ namespace blink {
|
||||
APKAssetProvider::APKAssetProvider(JNIEnv* env,
|
||||
jobject jassetManager,
|
||||
std::string directory)
|
||||
: java_asset_manager_(env, jassetManager),
|
||||
directory_(std::move(directory)) {
|
||||
: directory_(std::move(directory)) {
|
||||
assetManager_ = AAssetManager_fromJava(env, jassetManager);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include <jni.h>
|
||||
|
||||
#include "flutter/assets/asset_resolver.h"
|
||||
#include "flutter/fml/platform/android/scoped_java_ref.h"
|
||||
#include "lib/fxl/memory/ref_counted.h"
|
||||
|
||||
namespace blink {
|
||||
@@ -22,7 +21,6 @@ class APKAssetProvider final : public AssetResolver {
|
||||
virtual ~APKAssetProvider();
|
||||
|
||||
private:
|
||||
fml::jni::ScopedJavaGlobalRef<jobject> java_asset_manager_;
|
||||
AAssetManager* assetManager_;
|
||||
const std::string directory_;
|
||||
|
||||
@@ -38,4 +36,4 @@ class APKAssetProvider final : public AssetResolver {
|
||||
|
||||
} // namespace blink
|
||||
|
||||
#endif // FLUTTER_ASSETS_APK_ASSET_PROVIDER_H
|
||||
#endif // FLUTTER_ASSETS_APK_ASSET_PROVIDER_H
|
||||
Reference in New Issue
Block a user