Bug 165759

Summary: possible to create dependency loops in data objects through javaScript
Product: [Applications] kst Reporter: Andrew Walker <arwalker>
Component: generalAssignee: kst
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.7.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Andrew Walker 2008-07-04 23:23:21 UTC
Version:           1.7.0 (using KDE 3.5.8)
Installed from:    Compiled From Sources
OS:                Linux

it is possible to create dependency loops in data objects through the use of javaScript

for example:

v=new Vector()
v.resize(10)
hs=new Histogram(v, -10, 10, 5)
hs.setVector(hs.xVector)

This create a histogram whose output is also its input.
This should not be permissible.
Comment 1 Andrew Walker 2008-07-04 23:24:20 UTC
SVN commit 828198 by arwalker:

CCBUG:165759 first draft at preventing dependency loops

 M  +34 -0     extensions/js/bind_csd.cpp  
 M  +6 -0      extensions/js/bind_csd.h  
 M  +5 -0      extensions/js/bind_equation.cpp  
 M  +6 -0      extensions/js/bind_histogram.cpp  
 M  +36 -0     extensions/js/bind_plugin.cpp  
 M  +35 -0     extensions/js/bind_powerspectrum.cpp  
 M  +6 -0      extensions/js/bind_powerspectrum.h  
 M  +5 -0      libkstmath/kstcsd.cpp  
 M  +1 -0      libkstmath/kstcsd.h  
 M  +4 -4      libkstmath/kstdataobject.cpp  
 M  +7 -0      libkstmath/kstpsd.cpp  
 M  +1 -0      libkstmath/kstpsd.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=828198
Comment 2 Andrew Walker 2008-07-08 19:25:35 UTC
SVN commit 829584 by arwalker:

CCBUG:165759 prevent dependency loops in the vector view object

 M  +12 -0     extensions/js/bind_vectorview.cpp  
 M  +8 -0      libkstapp/kstvvdialog_i.cpp  
 M  +4 -0      libkstmath/kstvectorview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=829584
Comment 3 Andrew Walker 2008-07-09 01:54:01 UTC
it should now be impossible to create any dependency loops