| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 // Entry Point | 87 // Entry Point |
| 88 void FilterLoader(CPluginTabBase* tabBase) | 88 void FilterLoader(CPluginTabBase* tabBase) |
| 89 { | 89 { |
| 90 try | 90 try |
| 91 { | 91 { |
| 92 tabBase->m_filter->LoadHideFilters(CPluginClient::GetInstance()->GetElemen tHidingSelectors(tabBase->GetDocumentDomain())); | 92 tabBase->m_filter->LoadHideFilters(CPluginClient::GetInstance()->GetElemen tHidingSelectors(tabBase->GetDocumentDomain())); |
| 93 SetEvent(tabBase->m_filter->hideFiltersLoadedEvent); | 93 SetEvent(tabBase->m_filter->hideFiltersLoadedEvent); |
| 94 } | 94 } |
| 95 catch (...) | 95 catch (...) |
| 96 { | 96 { |
| 97 // There's presently a race condition between loading filters and terminat ing the appplication; see #1654. | 97 // As a thread-main function, we truncate any C++ exception. |
| 98 // In this particular case, it's OK to simply suppress the exception. | |
|
sergei
2015/02/13 14:41:40
This comment is not relevant as well.
Eric
2015/02/13 15:13:52
This wording is indeed not right. I've changed it
| |
| 99 } | 98 } |
| 100 } | 99 } |
| 101 } | 100 } |
| 102 | 101 |
| 103 void CPluginTabBase::OnNavigate(const std::wstring& url) | 102 void CPluginTabBase::OnNavigate(const std::wstring& url) |
| 104 { | 103 { |
| 105 SetDocumentUrl(url); | 104 SetDocumentUrl(url); |
| 106 ClearFrameCache(GetDocumentDomain()); | 105 ClearFrameCache(GetDocumentDomain()); |
| 107 std::wstring domainString = GetDocumentDomain(); | 106 std::wstring domainString = GetDocumentDomain(); |
| 108 ResetEvent(m_filter->hideFiltersLoadedEvent); | 107 ResetEvent(m_filter->hideFiltersLoadedEvent); |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 375 CPluginClient::LogPluginError(pluginError.GetErrorCode(), pluginError. GetErrorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), tr ue, pluginError.GetProcessId(), pluginError.GetThreadId()); | 374 CPluginClient::LogPluginError(pluginError.GetErrorCode(), pluginError. GetErrorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), tr ue, pluginError.GetProcessId(), pluginError.GetThreadId()); |
| 376 } | 375 } |
| 377 | 376 |
| 378 // Non-hanging sleep | 377 // Non-hanging sleep |
| 379 Sleep(50); | 378 Sleep(50); |
| 380 } | 379 } |
| 381 | 380 |
| 382 tabLoopIteration++; | 381 tabLoopIteration++; |
| 383 } | 382 } |
| 384 } | 383 } |
| LEFT | RIGHT |