Bug 1567057 - TabListener is only for contentSessionStore on desktop r=peterv

Don't need TabListener on geckoview

Differential Revision: https://phabricator.services.mozilla.com/D38630

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alphan Chen 2019-07-24 08:05:55 +00:00
Родитель 5e07a53115
Коммит bb06ecd152
2 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -3002,12 +3002,14 @@ nsresult nsFrameLoader::EnsureMessageManager() {
GetDocShell(), mOwnerContent, mMessageManager); GetDocShell(), mOwnerContent, mMessageManager);
NS_ENSURE_TRUE(mChildMessageManager, NS_ERROR_UNEXPECTED); NS_ENSURE_TRUE(mChildMessageManager, NS_ERROR_UNEXPECTED);
#if !defined(MOZ_WIDGET_ANDROID)
// Set up a TabListener for sessionStore // Set up a TabListener for sessionStore
if (XRE_IsParentProcess()) { if (XRE_IsParentProcess()) {
mSessionStoreListener = new TabListener(GetDocShell(), mOwnerContent); mSessionStoreListener = new TabListener(GetDocShell(), mOwnerContent);
rv = mSessionStoreListener->Init(); rv = mSessionStoreListener->Init();
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
} }
#endif
} }
return NS_OK; return NS_OK;
} }

Просмотреть файл

@ -595,10 +595,11 @@ nsresult BrowserChild::Init(mozIDOMWindowProxy* aParent) {
mPuppetWidget->CreateCompositor(); mPuppetWidget->CreateCompositor();
} }
#if !defined(MOZ_WIDGET_ANDROID)
mSessionStoreListener = new TabListener(docShell, nullptr); mSessionStoreListener = new TabListener(docShell, nullptr);
rv = mSessionStoreListener->Init(); rv = mSessionStoreListener->Init();
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
#endif
return NS_OK; return NS_OK;
} }