From 1a03607bd3e686d79e327a714b819f56daf18586 Mon Sep 17 00:00:00 2001 From: "stoyan@chromium.org" Date: Tue, 17 Aug 2010 16:00:17 +0000 Subject: Reland 56241: Add an exceptionbarrier in Hook_Start(Ex). This is an attempt to reduce the amount of false positive crash reports - when exception is swallowed and is almost always not a problem due ChromeFrame code. BUG=51830 TBR=amit@chromium.org Review URL: http://codereview.chromium.org/3148015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56357 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_frame/protocol_sink_wrap.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'chrome_frame/protocol_sink_wrap.cc') diff --git a/chrome_frame/protocol_sink_wrap.cc b/chrome_frame/protocol_sink_wrap.cc index 0b3e5a7..5d28438 100644 --- a/chrome_frame/protocol_sink_wrap.cc +++ b/chrome_frame/protocol_sink_wrap.cc @@ -14,6 +14,7 @@ #include "chrome_frame/bho.h" #include "chrome_frame/bind_context_info.h" +#include "chrome_frame/exception_barrier.h" #include "chrome_frame/function_stub.h" #include "chrome_frame/utils.h" @@ -175,6 +176,7 @@ STDMETHODIMP ProtocolSinkWrap::ReportResult(HRESULT result, DWORD error, LPCWSTR result_text) { DLOG(INFO) << "ProtocolSinkWrap::ReportResult: result: " << result << " error: " << error << " Text: " << (result_text ? result_text : L""); + ExceptionBarrier barrier; HRESULT hr = prot_data_->ReportResult(delegate_, result, error, result_text); return hr; } @@ -613,6 +615,7 @@ STDMETHODIMP Hook_Start(InternetProtocol_Start_Fn orig_start, return E_INVALIDARG; DLOG_IF(INFO, url != NULL) << "OnStart: " << url << PiFlags2Str(flags); + ExceptionBarrier barrier; ScopedComPtr bind_ctx = BindCtxFromIBindInfo(bind_info); if (!bind_ctx) { // MSHTML sometimes takes a short path, skips the creation of @@ -669,6 +672,7 @@ STDMETHODIMP Hook_StartEx(InternetProtocol_StartEx_Fn orig_start_ex, uri->GetPropertyBSTR(Uri_PROPERTY_ABSOLUTE_URI, url.Receive(), 0); DLOG_IF(INFO, url != NULL) << "OnStartEx: " << url << PiFlags2Str(flags); + ExceptionBarrier barrier; ScopedComPtr bind_ctx = BindCtxFromIBindInfo(bind_info); if (!bind_ctx) { // MSHTML sometimes takes a short path, skips the creation of -- cgit v1.1