From b6dff9908433d28b0035ed215df9f3dc84e8ce52 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Wed, 14 Jan 2015 11:04:00 -0800 Subject: [PATCH] Bug 1121198 part 3: Make nsFrameLoader::UpdateBaseWindowPositionAndSize infallible, since it only returns NS_OK. r=bz --- dom/base/nsFrameLoader.cpp | 9 ++++----- dom/base/nsFrameLoader.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dom/base/nsFrameLoader.cpp b/dom/base/nsFrameLoader.cpp index 03621f6d7327..ef2623e9d64f 100644 --- a/dom/base/nsFrameLoader.cpp +++ b/dom/base/nsFrameLoader.cpp @@ -1963,10 +1963,11 @@ nsFrameLoader::UpdatePositionAndSize(nsSubDocumentFrame *aIFrame) } return NS_OK; } - return UpdateBaseWindowPositionAndSize(aIFrame); + UpdateBaseWindowPositionAndSize(aIFrame); + return NS_OK; } -nsresult +void nsFrameLoader::UpdateBaseWindowPositionAndSize(nsSubDocumentFrame *aIFrame) { nsCOMPtr docShell; @@ -1984,15 +1985,13 @@ nsFrameLoader::UpdateBaseWindowPositionAndSize(nsSubDocumentFrame *aIFrame) if (!weakFrame.IsAlive()) { // GetPosition() killed us - return NS_OK; + return; } nsIntSize size = aIFrame->GetSubdocumentSize(); baseWindow->SetPositionAndSize(x, y, size.width, size.height, false); } - - return NS_OK; } NS_IMETHODIMP diff --git a/dom/base/nsFrameLoader.h b/dom/base/nsFrameLoader.h index 515fe883f50b..5a04a860ba41 100644 --- a/dom/base/nsFrameLoader.h +++ b/dom/base/nsFrameLoader.h @@ -287,7 +287,7 @@ private: // Updates the subdocument position and size. This gets called only // when we have our own in-process DocShell. - nsresult UpdateBaseWindowPositionAndSize(nsSubDocumentFrame *aIFrame); + void UpdateBaseWindowPositionAndSize(nsSubDocumentFrame *aIFrame); nsresult CheckURILoad(nsIURI* aURI); void FireErrorEvent(); nsresult ReallyStartLoadingInternal();