Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/PluginTabBase.cpp

Issue 29334386: Issue #2230 - Refactor filter life cycle and use
Patch Set: rebase only Created May 17, 2016, 7:45 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/plugin/PluginTabBase.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginTabBase.cpp
===================================================================
--- a/src/plugin/PluginTabBase.cpp
+++ b/src/plugin/PluginTabBase.cpp
@@ -46,14 +46,11 @@
DEBUG_SYSTEM_EXCEPTION(ex, PLUGIN_ERROR_THREAD, PLUGIN_ERROR_TAB_THREAD_CREATE_PROCESS,
"Tab::Thread - Failed to create tab thread");
}
- m_traverser = new CPluginDomTraverser(static_cast<CPluginTab*>(this));
}
CPluginTab::~CPluginTab()
{
- delete m_traverser;
- m_traverser = NULL;
m_continueThreadRunning = false;
if (m_thread.joinable()) {
m_thread.join();
@@ -115,7 +112,6 @@
DEBUG_SYSTEM_EXCEPTION(ex, PLUGIN_ERROR_THREAD, PLUGIN_ERROR_MAIN_THREAD_CREATE_PROCESS,
"Class::Thread - Failed to start filter loader thread");
}
- m_traverser->ClearCache();
}
namespace
@@ -265,7 +261,8 @@
std::wstring url = GetDocumentUrl();
if (!client->IsWhitelistedUrl(url) && !client->IsElemhideWhitelistedOnDomain(url))
{
- m_traverser->TraverseDocument(browser, GetDocumentDomain(), GetDocumentUrl());
+ CPluginDomTraverser traversal(&m_filter);
+ traversal.TraverseDocumentRoot(browser, GetDocumentDomain(), GetDocumentUrl());
}
InjectABP(browser);
}
« no previous file with comments | « src/plugin/PluginTabBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld