From e7dd215464a368a2a0f4f4880dccf15597341064 Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Fri, 7 May 2010 21:59:44 +0000 Subject: Another attempt to reduce the number of false positive crashes reported in ChromeFrame. There appear to be a number of crashes caused when we wrap the bind status callback and call the underlying IMoniker::BindToStorage function. The crashes occur because of urlmon calling into dlls which have been unloaded. Fix is to use the exception barrier version which only reports crashes which occur directly in chrome frame in our BindtoStorage call and to use the generic ExceptionBarrier in our bind status callback wrapper before calling out to the underlying callback. Fixes bug http://code.google.com/p/chromium/issues/detail?id=43373 Bug=43373 Review URL: http://codereview.chromium.org/2002009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46742 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_frame/urlmon_moniker.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'chrome_frame/urlmon_moniker.cc') diff --git a/chrome_frame/urlmon_moniker.cc b/chrome_frame/urlmon_moniker.cc index cc9d6a8..6a3910b 100644 --- a/chrome_frame/urlmon_moniker.cc +++ b/chrome_frame/urlmon_moniker.cc @@ -209,6 +209,9 @@ HRESULT MonikerPatch::BindToStorage(IMoniker_BindToStorage_Fn original, IMoniker* to_left, REFIID iid, void** obj) { DCHECK(to_left == NULL); + // Report a crash if the crash is in our own module. + ExceptionBarrierReportOnlyModule barrier; + HRESULT hr = S_OK; CComObject* callback = NULL; if (ShouldWrapCallback(me, iid, bind_ctx)) { @@ -216,15 +219,8 @@ HRESULT MonikerPatch::BindToStorage(IMoniker_BindToStorage_Fn original, callback->AddRef(); hr = callback->Initialize(me, bind_ctx); DCHECK(SUCCEEDED(hr)); - - // Report all crashes in the exception handler if we wrap the callback. - // Note that this avoids having the VEH report a crash if an SEH earlier in - // the chain handles the exception. - ExceptionBarrier barrier; hr = original(me, bind_ctx, to_left, iid, obj); } else { - // If we don't wrap, only report a crash if the crash is in our own module. - ExceptionBarrierReportOnlyModule barrier; hr = original(me, bind_ctx, to_left, iid, obj); } -- cgit v1.1