From 72354315dd3c9682370ee2eea62446b7e5539990 Mon Sep 17 00:00:00 2001 From: "robertshield@chromium.org" Date: Sat, 1 May 2010 02:10:06 +0000 Subject: Avoid reporting crashes for exceptions that hit our SEH from calls to the original implementation of BindToStorage() when we do not wrap the bind status callback. BUG=42660 TEST=Induce exception in code called under original IMoniker::BindToStorage implementation when we don't wrap the callback and notice that no crash is reported. Review URL: http://codereview.chromium.org/1748016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46176 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_frame/urlmon_moniker.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'chrome_frame/urlmon_moniker.cc') diff --git a/chrome_frame/urlmon_moniker.cc b/chrome_frame/urlmon_moniker.cc index 4150927..cc9d6a8 100644 --- a/chrome_frame/urlmon_moniker.cc +++ b/chrome_frame/urlmon_moniker.cc @@ -174,7 +174,7 @@ HRESULT MonikerPatch::BindToObject(IMoniker_BindToObject_Fn original, DLOG(INFO) << __FUNCTION__; DCHECK(to_left == NULL); - ExceptionBarrier barrier; + ExceptionBarrierReportOnlyModule barrier; HRESULT hr = S_OK; // Bind context is marked for switch when we sniff data in BSCBStorageBind @@ -217,11 +217,14 @@ HRESULT MonikerPatch::BindToStorage(IMoniker_BindToStorage_Fn original, hr = callback->Initialize(me, bind_ctx); DCHECK(SUCCEEDED(hr)); - // Call the original back under an exception barrier only if we should - // wrap the callback. + // 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