FWIW, our C++ code to load the script files looks like this.  The error happens 
regardless of myIsChrome's value.

NS_ENSURE_STATE( myScriptContext );

nsEmbedString returnValue;

PRBool isUndefined = PR_FALSE;

myScriptContext->EvaluateString( script,

                                                  NULL, // Use default scope

                                                  myIsChrome ? 
mySystemPrincipal : myDocumentPrincipal,

                                                  universal_string( 
nsEmbedString( uri ).get() ).toAscii(),

                                                  0,

                                                  NULL, // Use default version 
for the context

                                                  &returnValue,

                                                  &isUndefined );



"Phil McLachlan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> I'm upgrading an app that embeds Firefox from FF 2 to FF 3.  Scripts that 
> use eval worked with FF 2, but they get an error message with FF 3.
> 
> "function eval must be called directly, and not by way of a function of 
> another name"
> 
> Does anyone know how to fix this?  Thanks.
> 
>
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to