Bug 1127379 - Make TabParent::GetWidgetNativeData less failure prone. r=roc

This commit is contained in:
Jim Mathies 2015-01-30 10:37:03 -06:00
parent 93798499c7
commit a1ee08cca3

View File

@ -2126,6 +2126,7 @@ TabParent::RecvGetDefaultScale(double* aValue)
bool
TabParent::RecvGetWidgetNativeData(WindowsHandle* aValue)
{
*aValue = 0;
nsCOMPtr<nsIContent> content = do_QueryInterface(mFrameElement);
if (content) {
nsIPresShell* shell = content->OwnerDoc()->GetShell();
@ -2136,11 +2137,10 @@ TabParent::RecvGetWidgetNativeData(WindowsHandle* aValue)
if (widget) {
*aValue = reinterpret_cast<WindowsHandle>(
widget->GetNativeData(NS_NATIVE_SHAREABLE_WINDOW));
return true;
}
}
}
return false;
return true;
}
bool