 Issue 11427013:
  Appear fast for IE  (Closed)
    
  
    Issue 11427013:
  Appear fast for IE  (Closed) 
  | Index: src/plugin/PluginTabBase.cpp | 
| =================================================================== | 
| --- a/src/plugin/PluginTabBase.cpp | 
| +++ b/src/plugin/PluginTabBase.cpp | 
| @@ -29,6 +29,7 @@ | 
| CPluginTabBase::CPluginTabBase(CPluginClass* plugin) : m_plugin(plugin), m_isActivated(false) | 
| { | 
| m_filter = std::auto_ptr<CPluginFilter>(new CPluginFilter()); | 
| + m_filter->hideFiltersLoadedEvent = CreateEvent(NULL, true, false, NULL); | 
| CPluginClient* client = CPluginClient::GetInstance(); | 
| if (client->GetIEVersion() < 10) | 
| @@ -82,6 +83,13 @@ | 
| m_isActivated = true; | 
| } | 
| +DWORD WINAPI FilterLoader(void* thisPtrVoid) | 
| 
Wladimir Palant
2013/08/13 09:41:02
Use LPVOID rather than void* to match ThreadProc s
 | 
| +{ | 
| + CPluginTabBase* thisPtr = (CPluginTabBase*)thisPtrVoid; | 
| 
Wladimir Palant
2013/08/13 09:41:02
Given that there really is no "this" pointer here
 | 
| + thisPtr->m_filter->LoadHideFilters(CPluginClient::GetInstance()->GetElementHidingSelectors(thisPtr->GetDocumentDomain().GetString())); | 
| + SetEvent(thisPtr->m_filter->hideFiltersLoadedEvent); | 
| + return 0; | 
| +} | 
| void CPluginTabBase::OnNavigate(const CString& url) | 
| { | 
| @@ -93,7 +101,8 @@ | 
| #endif | 
| std::wstring domainString = GetDocumentDomain(); | 
| - m_filter->LoadHideFilters(CPluginClient::GetInstance()->GetElementHidingSelectors(domainString)); | 
| + ResetEvent(m_filter->hideFiltersLoadedEvent); | 
| + CreateThread(NULL, NULL, &FilterLoader, this, NULL, NULL); | 
| #ifdef SUPPORT_DOM_TRAVERSER | 
| m_traverser->ClearCache(); |