RooChi2Var does not work with Function?

Hello,
I’m trying to use RooChi2Var to fit my histogram with a function, but can’t get the expected results. It seems the following code in roofit/roofitcore/src/RooChi2Var.cxx (line 230-233 of http://root.cern.ch/root/html/src/RooChi2Var.cxx.html#YK3WxD )

// Double_t eIntLo,eIntHi ; // hdata->weightError(eIntLo,eIntHi,_etype) ; // Double_t eInt = (eExt>0) ? eIntHi : eIntLo ; Double_t eInt = sqrt(nPdf) ;
calculate the error always from the sqrt(expectation), even though some code before them carefully calculate the normFactor for different _funcMode.
Is there any problem to comment this line out and use the hdata->weightError(…)? Thanks in advance.