Bug 1575326 - Fix usage of nsIDocShellTreeItem in nsDocShell::SetIsActive. r=kmag

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tetsuharu OHZEKI 2020-01-07 08:08:49 +00:00
Родитель 1fb4d249f5
Коммит ea36f666a0
1 изменённых файлов: 1 добавлений и 3 удалений

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

@ -4874,9 +4874,7 @@ nsDocShell::SetIsActive(bool aIsActive) {
if (RefPtr<Document> doc = mScriptGlobal->GetExtantDoc()) { if (RefPtr<Document> doc = mScriptGlobal->GetExtantDoc()) {
// Update orientation when the top-level browsing context becomes active. // Update orientation when the top-level browsing context becomes active.
if (aIsActive) { if (aIsActive) {
nsCOMPtr<nsIDocShellTreeItem> parent; if (mBrowsingContext->IsTop()) {
GetInProcessSameTypeParent(getter_AddRefs(parent));
if (!parent) {
// We only care about the top-level browsing context. // We only care about the top-level browsing context.
uint16_t orientation = OrientationLock(); uint16_t orientation = OrientationLock();
ScreenOrientation::UpdateActiveOrientationLock(orientation); ScreenOrientation::UpdateActiveOrientationLock(orientation);