OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <htiframe.h> | 5 #include <htiframe.h> |
6 #include <mshtml.h> | 6 #include <mshtml.h> |
7 | 7 |
8 #include "chrome_frame/protocol_sink_wrap.h" | 8 #include "chrome_frame/protocol_sink_wrap.h" |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 // We are just pass through at this point, avoid false positive crash | 864 // We are just pass through at this point, avoid false positive crash |
865 // reports. | 865 // reports. |
866 ExceptionBarrierReportOnlyModule barrier; | 866 ExceptionBarrierReportOnlyModule barrier; |
867 return orig_req(protocol, hr, options); | 867 return orig_req(protocol, hr, options); |
868 } | 868 } |
869 | 869 |
870 STDMETHODIMP Hook_Terminate(InternetProtocol_Terminate_Fn orig_req, | 870 STDMETHODIMP Hook_Terminate(InternetProtocol_Terminate_Fn orig_req, |
871 IInternetProtocol* protocol, | 871 IInternetProtocol* protocol, |
872 DWORD options) { | 872 DWORD options) { |
873 scoped_refptr<ProtData> prot_data = ProtData::DataFromProtocol(protocol); | 873 scoped_refptr<ProtData> prot_data = ProtData::DataFromProtocol(protocol); |
874 if (prot_data) | 874 // TODO(ananta/robertshield) |
| 875 // Write a test for this bug http://crbug.com/178421 |
| 876 if (prot_data && !IsChrome(prot_data->renderer_type())) |
875 prot_data->Invalidate(); | 877 prot_data->Invalidate(); |
876 | 878 |
877 // We are just pass through at this point, avoid false positive crash | 879 // We are just pass through at this point, avoid false positive crash |
878 // reports. | 880 // reports. |
879 ExceptionBarrierReportOnlyModule barrier; | 881 ExceptionBarrierReportOnlyModule barrier; |
880 return orig_req(protocol, options); | 882 return orig_req(protocol, options); |
881 } | 883 } |
882 | 884 |
883 // Patching / Hooking code. | 885 // Patching / Hooking code. |
884 class FakeProtocol : public CComObjectRootEx<CComSingleThreadModel>, | 886 class FakeProtocol : public CComObjectRootEx<CComSingleThreadModel>, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 // Explicit release, otherwise ~CComObjectStackEx will complain about | 984 // Explicit release, otherwise ~CComObjectStackEx will complain about |
983 // outstanding reference to us, because it runs before ~FakeProtocol | 985 // outstanding reference to us, because it runs before ~FakeProtocol |
984 prot.transaction_.Release(); | 986 prot.transaction_.Release(); |
985 } | 987 } |
986 } | 988 } |
987 | 989 |
988 void TransactionHooks::RevertHooks() { | 990 void TransactionHooks::RevertHooks() { |
989 vtable_patch::UnpatchInterfaceMethods(CTransaction_PatchInfo); | 991 vtable_patch::UnpatchInterfaceMethods(CTransaction_PatchInfo); |
990 vtable_patch::UnpatchInterfaceMethods(CTransaction2_PatchInfo); | 992 vtable_patch::UnpatchInterfaceMethods(CTransaction2_PatchInfo); |
991 } | 993 } |
OLD | NEW |