Benjamin D. Smedberg wrote:

Jonathan Watt wrote:

Actually it is for something similar. I want to prevent JS code from passing SVG objects that are not implemented by the C++ SVG code to functions on SVG objects that expect one. Specifically, as shown in bug 164049, I want to make sure that the underlying implementation of the nsISVGMatrix passed to nsSVGTransform::SetMatrix() is an nsSVGMatrix object. Would you be able to point me in the direction of the relevant


QI the object to nsISVGValue. That is a pseudo-interface implemented by nsSVGMatrix that a JS object can't implement.

--BDS

Thanks Benjamin, that's what I was intending on doing. I was just wondering if the DOM code did it in a central location (when JS objects get turned into C++ objects?), or if every function that accepts an SVG object that may have come from JS has to do the check. Hence my question on where the relevant code for the existing DOM checks is. I'm still looking myself, but since I'm totally new to the DOM code I haven't found them yet. (Probably looking in the wrong places :).


Jonathan
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to