Bug 1434126 - Call GeckoSession.closeWindow() from onDestroy() in CustomTabsActivity and WebAppActivity. r=snorp

This commit is contained in:
Dylan Roeh 2018-02-07 09:15:12 -06:00
parent a11a9d201f
commit cb9419b55e
3 changed files with 4 additions and 1 deletions

View File

@ -179,6 +179,7 @@ public class CustomTabsActivity extends AppCompatActivity
@Override
public void onDestroy() {
mGeckoSession.closeWindow();
mTextSelection.destroy();
mFormAssistPopup.destroy();
mDoorHangerPopup.destroy();

View File

@ -217,6 +217,7 @@ public class WebAppActivity extends AppCompatActivity
@Override
public void onDestroy() {
mGeckoSession.closeWindow();
mTextSelection.destroy();
mDoorHangerPopup.destroy();
mPromptService.destroy();

View File

@ -565,7 +565,8 @@ public class GeckoSession extends LayerSession
ThreadUtils.assertOnUiThread();
if (!isOpen()) {
throw new IllegalStateException("Session is not open");
Log.w(LOGTAG, "Attempted to close a GeckoSession that was already closed.")
return;
}
if (GeckoThread.isStateAtLeast(GeckoThread.State.PROFILE_READY)) {