This function was moved to here due to the BrowserContext refactoring