diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-13 18:18:14 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-13 18:18:14 +0000 |
commit | dd4beb52162f4ac3e21c0a6eed670fcd36d2d8d6 (patch) | |
tree | 0b3918829d1a122d3af42693884616fe942e76e1 /chrome_frame/chrome_active_document.cc | |
parent | 763423c29287ca2de6d6bc9a800bd571cd5e075d (diff) | |
download | chromium_src-dd4beb52162f4ac3e21c0a6eed670fcd36d2d8d6.zip chromium_src-dd4beb52162f4ac3e21c0a6eed670fcd36d2d8d6.tar.gz chromium_src-dd4beb52162f4ac3e21c0a6eed670fcd36d2d8d6.tar.bz2 |
Handling case where automation server is NULL when creating the active doc window.
I'm not sure why the server couldn't be created but we shouldn't crash.
BUG=48846
TEST=Fixes crash.
Review URL: http://codereview.chromium.org/2895010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52191 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_active_document.cc')
-rw-r--r-- | chrome_frame/chrome_active_document.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc index faab456..da3da63 100644 --- a/chrome_frame/chrome_active_document.cc +++ b/chrome_frame/chrome_active_document.cc @@ -519,6 +519,12 @@ HRESULT ChromeActiveDocument::ActiveXDocActivate(LONG verb) { SetFocus(); } else { m_hWnd = Create(parent_window, position_rect, 0, 0, WS_EX_CLIENTEDGE); + if (!IsWindow()) { + // This might happen if the automation server couldn't be + // instantiated. If so, a NOTREACHED() will have already been hit. + DLOG(ERROR) << "Failed to create Ax window"; + return AtlHresultFromLastError(); + } } ScopedComPtr<IWebBrowser2> web_browser2; |