| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome_frame/buggy_bho_handling.h" | 5 #include "chrome_frame/buggy_bho_handling.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/scoped_comptr_win.h" | 8 #include "base/scoped_comptr_win.h" |
| 9 | 9 |
| 10 #include "chrome_frame/exception_barrier.h" | 10 #include "chrome_frame/exception_barrier.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 BuggyBhoTls* BuggyBhoTls::FromCurrentThread() { | 96 BuggyBhoTls* BuggyBhoTls::FromCurrentThread() { |
| 97 return s_bad_object_tls_.Get(); | 97 return s_bad_object_tls_.Get(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 // static | 100 // static |
| 101 STDMETHODIMP BuggyBhoTls::BuggyBhoInvoke(InvokeFunc original, IDispatch* me, | 101 STDMETHODIMP BuggyBhoTls::BuggyBhoInvoke(InvokeFunc original, IDispatch* me, |
| 102 DISPID dispid, REFIID riid, LCID lcid, | 102 DISPID dispid, REFIID riid, LCID lcid, |
| 103 WORD flags, DISPPARAMS* params, | 103 WORD flags, DISPPARAMS* params, |
| 104 VARIANT* result, EXCEPINFO* ei, | 104 VARIANT* result, EXCEPINFO* ei, |
| 105 UINT* err) { | 105 UINT* err) { |
| 106 DLOG(INFO) << __FUNCTION__; | 106 DVLOG(1) << __FUNCTION__; |
| 107 | 107 |
| 108 const BuggyBhoTls* tls = BuggyBhoTls::FromCurrentThread(); | 108 const BuggyBhoTls* tls = BuggyBhoTls::FromCurrentThread(); |
| 109 if (tls && tls->IsBuggyObject(me)) { | 109 if (tls && tls->IsBuggyObject(me)) { |
| 110 // Ignore this call and avoid the bug. | 110 // Ignore this call and avoid the bug. |
| 111 // TODO(tommi): Maybe we should check a specific list of DISPIDs too? | 111 // TODO(tommi): Maybe we should check a specific list of DISPIDs too? |
| 112 return S_OK; | 112 return S_OK; |
| 113 } | 113 } |
| 114 | 114 |
| 115 // No need to report crashes in those known-to-be-buggy DLLs. | 115 // No need to report crashes in those known-to-be-buggy DLLs. |
| 116 ExceptionBarrierReportOnlyModule barrier; | 116 ExceptionBarrierReportOnlyModule barrier; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 } | 209 } |
| 210 } | 210 } |
| 211 } | 211 } |
| 212 } | 212 } |
| 213 | 213 |
| 214 return hr; | 214 return hr; |
| 215 } | 215 } |
| 216 | 216 |
| 217 } // end namespace buggy_bho | 217 } // end namespace buggy_bho |
| 218 | 218 |
| OLD | NEW |