mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 1447193 - Ensure PresShell exists when activating a TabChild to ensure focus can be properly set early in TabChild lifetime. r=smaug
MozReview-Commit-ID: At7HAVd33hN --HG-- extra : rebase_source : 87c01d354d721d4bf427ed3b3c60426f88eb317b
This commit is contained in:
parent
4e10ada3b9
commit
aad0413d0b
@ -1486,6 +1486,12 @@ TabChild::ZoomToRect(const uint32_t& aPresShellId,
|
||||
mozilla::ipc::IPCResult
|
||||
TabChild::RecvActivate()
|
||||
{
|
||||
// Ensure that the PresShell exists, otherwise focusing
|
||||
// is definitely not going to work. GetPresShell should
|
||||
// create a PresShell if one doesn't exist yet.
|
||||
nsCOMPtr<nsIPresShell> presShell = GetPresShell();
|
||||
MOZ_ASSERT(presShell);
|
||||
|
||||
nsCOMPtr<nsIWebBrowserFocus> browser = do_QueryInterface(WebNavigation());
|
||||
browser->Activate();
|
||||
return IPC_OK();
|
||||
|
Loading…
Reference in New Issue
Block a user