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-04-28 00:45:08 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-28 00:45:08 +0000
commit219d1a6b592cfcb4028b4ff58bb3b4bb4e1684ec (patch)
treeaee53daa006731931e148338f5fdcdc06db2ed24 /chrome_frame/urlmon_moniker.cc
parentf24cd4f823335a899eba16aafe28d56f907f4b33 (diff)
downloadchromium_src-219d1a6b592cfcb4028b4ff58bb3b4bb4e1684ec.zip
chromium_src-219d1a6b592cfcb4028b4ff58bb3b4bb4e1684ec.tar.gz
chromium_src-219d1a6b592cfcb4028b4ff58bb3b4bb4e1684ec.tar.bz2
Add an ExceptionBarrier around outbound calls to patched methods in IE. In so doing, we have an SEH present in the SEH chain and so the VEH won't erroneously report crashes that occur in other modules when we happen to be on the stack.
BUG=42660 TEST=Less false positives in the crash reports. Review URL: http://codereview.chromium.org/1733021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45764 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/urlmon_moniker.cc')
-rw-r--r--chrome_frame/urlmon_moniker.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome_frame/urlmon_moniker.cc b/chrome_frame/urlmon_moniker.cc
index 4713da0..fe064ce 100644
--- a/chrome_frame/urlmon_moniker.cc
+++ b/chrome_frame/urlmon_moniker.cc
@@ -9,6 +9,7 @@
#include "base/string_util.h"
#include "chrome_frame/bho.h"
#include "chrome_frame/bind_context_info.h"
+#include "chrome_frame/exception_barrier.h"
#include "chrome_frame/chrome_active_document.h"
#include "chrome_frame/urlmon_bind_status_callback.h"
#include "chrome_frame/utils.h"
@@ -161,6 +162,8 @@ HRESULT MonikerPatch::BindToObject(IMoniker_BindToObject_Fn original,
DLOG(INFO) << __FUNCTION__;
DCHECK(to_left == NULL);
+ ExceptionBarrier barrier;
+
HRESULT hr = S_OK;
// Bind context is marked for switch when we sniff data in BSCBStorageBind
// and determine that the renderer to be used is Chrome.
@@ -201,9 +204,14 @@ HRESULT MonikerPatch::BindToStorage(IMoniker_BindToStorage_Fn original,
callback->AddRef();
hr = callback->Initialize(me, bind_ctx);
DCHECK(SUCCEEDED(hr));
- }
- hr = original(me, bind_ctx, to_left, iid, obj);
+ // Call the original back under an exception barrier only if we should
+ // wrap the callback.
+ ExceptionBarrier barrier;
+ hr = original(me, bind_ctx, to_left, iid, obj);
+ } else {
+ hr = original(me, bind_ctx, to_left, iid, obj);
+ }
// If the binding terminates before the data could be played back
// now is the chance. Sometimes OnStopBinding happens after this returns