summaryrefslogtreecommitdiffstats
path: root/chrome_frame/urlmon_moniker.cc
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-01 02:10:06 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-01 02:10:06 +0000
commit72354315dd3c9682370ee2eea62446b7e5539990 (patch)
tree4f8be23e6d8ec76c7d537ca693815a7405cf2f02 /chrome_frame/urlmon_moniker.cc
parentc96c3c973c12f552ed6abd565fd326c32c227a5f (diff)
downloadchromium_src-72354315dd3c9682370ee2eea62446b7e5539990.zip
chromium_src-72354315dd3c9682370ee2eea62446b7e5539990.tar.gz
chromium_src-72354315dd3c9682370ee2eea62446b7e5539990.tar.bz2
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
Diffstat (limited to 'chrome_frame/urlmon_moniker.cc')
-rw-r--r--chrome_frame/urlmon_moniker.cc9
1 files changed, 6 insertions, 3 deletions
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);
}