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

Unified Diff: src/plugin/PluginFilter.cpp

Issue 12325013: Fix ATL assertion error in traverser (Closed)
Patch Set: Created Oct. 4, 2013, 8:45 a.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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginFilter.cpp
===================================================================
--- a/src/plugin/PluginFilter.cpp
+++ b/src/plugin/PluginFilter.cpp
@@ -387,19 +387,20 @@
break;
case ETraverserComplexType::TRAVERSER_TYPE_IMMEDIATE:
hr = S_FALSE;
- CComQIPtr<IHTMLDOMNode> pDomNode = pEl;
- if (pDomNode)
+ CComQIPtr<IHTMLDOMNode> pPrevSiblingNode = pEl;
+ if (pPrevSiblingNode)
{
- CComPtr<IHTMLDOMNode> pPrevSiblingNode = pDomNode;
long type;
do
{
- pPrevSiblingNode->get_previousSibling(&pPrevSiblingNode);
+ IHTMLDOMNode* tmpNode;
+ pPrevSiblingNode->get_previousSibling(&tmpNode);
+ pPrevSiblingNode.Attach(tmpNode);
Wladimir Palant 2013/10/08 10:30:38 For reference: this is the only place that needed
if (pPrevSiblingNode)
{
hr = pPrevSiblingNode->get_nodeType(&type);
if (hr != S_OK)
- pPrevSiblingNode = NULL;
+ pPrevSiblingNode.Release();
}
} while (pPrevSiblingNode && type != 1);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld