From 9af515627c00396e373435f9575e2c18b2e7b46a Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Mon, 16 Nov 2020 15:46:52 -0800 Subject: [PATCH] Make the AndroidContext superclass destructor virtual (flutter/engine#22555) Also remove an obsolete external_view_embedder reference from AndroidSurfaceFactoryImpl. Fixes https://github.com/flutter/flutter/issues/70621 --- .../flutter/shell/platform/android/context/android_context.h | 2 +- .../src/flutter/shell/platform/android/platform_view_android.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/engine/src/flutter/shell/platform/android/context/android_context.h b/engine/src/flutter/shell/platform/android/context/android_context.h index e9bdc06b17..77586e0fbb 100644 --- a/engine/src/flutter/shell/platform/android/context/android_context.h +++ b/engine/src/flutter/shell/platform/android/context/android_context.h @@ -22,7 +22,7 @@ class AndroidContext { public: explicit AndroidContext(AndroidRenderingAPI rendering_api); - ~AndroidContext(); + virtual ~AndroidContext(); AndroidRenderingAPI RenderingApi() const; diff --git a/engine/src/flutter/shell/platform/android/platform_view_android.h b/engine/src/flutter/shell/platform/android/platform_view_android.h index a808257ae7..3b424f2920 100644 --- a/engine/src/flutter/shell/platform/android/platform_view_android.h +++ b/engine/src/flutter/shell/platform/android/platform_view_android.h @@ -35,7 +35,6 @@ class AndroidSurfaceFactoryImpl : public AndroidSurfaceFactory { private: const AndroidContext& android_context_; std::shared_ptr jni_facade_; - std::weak_ptr external_view_embedder_; }; class PlatformViewAndroid final : public PlatformView {