Further tweak to 39933.

Add a comment mentioning the possible need to implement nsISecurityCheckedComponent.


git-svn-id: svn://10.0.0.236/trunk@76918 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mccabe%netscape.com 2000-08-23 00:24:07 +00:00
parent 30a169a26c
commit 4f32b85e2b
2 changed files with 18 additions and 0 deletions

View File

@ -381,6 +381,15 @@ SimplePluginInstance::GetScriptablePeer(void **aScriptablePeer)
{
// We implement the interface we want to be scriptable by
// (nsISimplePluginInstance) so we just return this.
// NOTE if this function returns something other than
// nsIPluginInstance, then that object will also need to implement
// nsISecurityCheckedComponent to be scriptable. The security
// system knows to special-case nsIPluginInstance when checking
// security, but in general, XPCOM components must implement
// nsISecurityCheckedComponent to be scriptable from content
// javascript.
*aScriptablePeer = NS_STATIC_CAST(nsISimplePluginInstance *, this);
NS_ADDREF(NS_STATIC_CAST(nsISimplePluginInstance *, *aScriptablePeer));
return NS_OK;

View File

@ -381,6 +381,15 @@ SimplePluginInstance::GetScriptablePeer(void **aScriptablePeer)
{
// We implement the interface we want to be scriptable by
// (nsISimplePluginInstance) so we just return this.
// NOTE if this function returns something other than
// nsIPluginInstance, then that object will also need to implement
// nsISecurityCheckedComponent to be scriptable. The security
// system knows to special-case nsIPluginInstance when checking
// security, but in general, XPCOM components must implement
// nsISecurityCheckedComponent to be scriptable from content
// javascript.
*aScriptablePeer = NS_STATIC_CAST(nsISimplePluginInstance *, this);
NS_ADDREF(NS_STATIC_CAST(nsISimplePluginInstance *, *aScriptablePeer));
return NS_OK;