From a3bc13b9a554d857d95f696a2b55db0ee57527b0 Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Fri, 2 Apr 2010 05:59:37 +0000 Subject: Fix a ChromeFrame crash which occurs probably in the upgrade scenario where we fail to cocreate our active document object which was most likely unregistered. Added a check to bail here. Fixes bug http://code.google.com/p/chromium/issues/detail?id=40169 Bug=40169 Review URL: http://codereview.chromium.org/1564008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43456 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_frame/urlmon_moniker.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'chrome_frame/urlmon_moniker.cc') diff --git a/chrome_frame/urlmon_moniker.cc b/chrome_frame/urlmon_moniker.cc index 91885a5..77c1fc6 100644 --- a/chrome_frame/urlmon_moniker.cc +++ b/chrome_frame/urlmon_moniker.cc @@ -445,7 +445,10 @@ HRESULT MonikerPatch::BindToObject(IMoniker_BindToObject_Fn original, // the already cached data. ScopedComPtr cf_doc; hr = cf_doc.CreateInstance(CLSID_ChromeActiveDocument); - DCHECK(SUCCEEDED(hr)); + if (FAILED(hr)) { + NOTREACHED() << "Failed to cocreate active document. Error:" << hr; + return original(me, bind_ctx, to_left, iid, obj); + } ScopedComPtr persist_moniker; hr = persist_moniker.QueryFrom(cf_doc); DCHECK(SUCCEEDED(hr)); -- cgit v1.1