Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: chrome_frame/urlmon_moniker.cc

Issue 1733021: Add an ExceptionBarrier around outbound calls to patched methods in IE. In so... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome_frame/urlmon_moniker.cc
===================================================================
--- chrome_frame/urlmon_moniker.cc (revision 45197)
+++ chrome_frame/urlmon_moniker.cc (working copy)
@@ -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 @@
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,10 +204,15 @@
callback->AddRef();
hr = callback->Initialize(me, bind_ctx);
DCHECK(SUCCEEDED(hr));
+
+ // 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);
}
- 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
// and then it's too late.
« chrome_frame/crash_reporting/crash_report.cc ('K') | « chrome_frame/exception_barrier_lowlevel.asm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698