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

Unified Diff: chrome_frame/chrome_active_document.cc

Issue 6493002: A number of poorly written IE BHO's crash IE if ChromeFrame is the currently ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
« no previous file with comments | « chrome_frame/buggy_bho_handling.cc ('k') | chrome_frame/utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/chrome_active_document.cc
===================================================================
--- chrome_frame/chrome_active_document.cc (revision 74374)
+++ chrome_frame/chrome_active_document.cc (working copy)
@@ -738,6 +738,19 @@
OLECMDEXECOPT_DODEFAULT, secure_lock_status.AsInput(), NULL);
}
+ // A number of poorly written bho's crash in their event sink callbacks if
+ // chrome frame is the currently loaded document. This is because they expect
+ // chrome frame to implement interfaces like IHTMLDocument, etc. We patch the
+ // event sink's of these bho's and don't invoke the event sink if chrome
+ // frame is the currently loaded document.
+ if (GetConfigBool(true, kEnableBuggyBhoIntercept)) {
+ ScopedComPtr<IWebBrowser2> wb2;
+ DoQueryService(SID_SWebBrowserApp, m_spClientSite, wb2.Receive());
+ if (wb2 && buggy_bho::BuggyBhoTls::GetInstance()) {
+ buggy_bho::BuggyBhoTls::GetInstance()->PatchBuggyBHOs(wb2);
+ }
+ }
+
// Ideally all navigations should come to Chrome Frame so that we can call
// BeforeNavigate2 on installed BHOs and give them a chance to cancel the
// navigation. However, in practice what happens is as below:
@@ -768,15 +781,6 @@
ScopedComPtr<IDocObjectService> doc_object_svc;
ScopedComPtr<IWebBrowserEventsService> web_browser_events_svc;
- buggy_bho::BuggyBhoTls bad_bho_tls;
- if (GetConfigBool(true, kEnableBuggyBhoIntercept)) {
- ScopedComPtr<IWebBrowser2> wb2;
- DoQueryService(SID_SWebBrowserApp, m_spClientSite, wb2.Receive());
- if (wb2) {
- buggy_bho::BuggyBhoTls::PatchBuggyBHOs(wb2);
- }
- }
-
DoQueryService(__uuidof(web_browser_events_svc), m_spClientSite,
web_browser_events_svc.Receive());
« no previous file with comments | « chrome_frame/buggy_bho_handling.cc ('k') | chrome_frame/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698