Commit 41331aab authored by Peter Van der Beken's avatar Peter Van der Beken
Browse files

Bug 1769155 - Null-check win in setter for IsActiveBrowserWindowInternal. r=smaug

parent d367b812
Loading
Loading
Loading
Loading
+14 −12
Original line number Diff line number Diff line
@@ -2998,6 +2998,7 @@ void BrowsingContext::DidSet(FieldIndex<IDX_IsActiveBrowserWindowInternal>,
      doc->UpdateDocumentStates(DocumentState::WINDOW_INACTIVE, true);

      RefPtr<nsPIDOMWindowInner> win = doc->GetInnerWindow();
      if (win) {
        RefPtr<MediaDevices> devices;
        if (isActivateEvent && (devices = win->GetExtantMediaDevices())) {
          devices->BrowserWindowBecameActive();
@@ -3013,6 +3014,7 @@ void BrowsingContext::DidSet(FieldIndex<IDX_IsActiveBrowserWindowInternal>,
              CanBubble::eYes, Cancelable::eYes, nullptr);
        }
      }
    }
  });
}