mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 07:01:19 +00:00

We used the Document::GetWindowContext() to get the window context related to the doucment. But, this could return a nullptr if the document is detached from the window or the docuemnt is destoried. We move to use the BrowsingContext instead which won't return a nullptr in these cases. Differential Revision: https://phabricator.services.mozilla.com/D79897