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()) {
// Update orientation when the top-level browsing context becomes active.
if (aIsActive) {
nsCOMPtr<nsIDocShellTreeItem> parent;
GetInProcessSameTypeParent(getter_AddRefs(parent));
if (!parent) {
if (mBrowsingContext->IsTop()) {
// We only care about the top-level browsing context.
uint16_t orientation = OrientationLock();
ScreenOrientation::UpdateActiveOrientationLock(orientation);