mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
XForms bug 301413 - Valid bindings generate MDG loop warning. patch my beaufour, r=smaug/me a=mkaply
This commit is contained in:
parent
92a3b09330
commit
bbb382b955
@ -198,8 +198,14 @@ nsXFormsMDGEngine::AddMIP(ModelItemPropName aType,
|
||||
if (!dep_domnode) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_XF_MDG
|
||||
printf("\tDependency #%2d: %p\n", i, (void*) dep_domnode);
|
||||
#endif
|
||||
|
||||
dep_gnode = GetNode(dep_domnode, aType);
|
||||
// Get calculate graph node for the dependency (only a calculate
|
||||
// property can influence another MIP).
|
||||
dep_gnode = GetNode(dep_domnode, eModel_calculate);
|
||||
if (!dep_gnode) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
@ -209,6 +215,8 @@ nsXFormsMDGEngine::AddMIP(ModelItemPropName aType,
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add this node as a successor to the dependency (ie. the dependency
|
||||
// should be (re-)calculated before this node)
|
||||
dep_gnode->mSuc.AppendElement(newnode);
|
||||
newnode->mCount++;
|
||||
}
|
||||
@ -542,6 +550,11 @@ nsXFormsMDGEngine::Rebuild()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_XF_MDG
|
||||
printf("\tmGraph.Count() = %2d\n", mGraph.Count());
|
||||
printf("\tmNodesInGraph = %2d\n", mNodesInGraph);
|
||||
#endif
|
||||
|
||||
if (mGraph.Count() != mNodesInGraph) {
|
||||
NS_WARNING("XForms: There are loops in the MDG\n");
|
||||
rv = NS_ERROR_ABORT;
|
||||
|
Loading…
Reference in New Issue
Block a user