About js massager

1 view
Skip to first unread message

wenbin wang

unread,
Dec 7, 2009, 9:23:39 PM12/7/09
to google-gadgets-for-linux-user
Thanks for your help.
I have a new question:
JSObjectRef CompileFunction(JSScriptContext *ctx, const char *script,
const char
*filename, int lineno,
JSValueRef
*exceptio)
if (!script)
return NULL;
std::string massaged_script = MassageJScript(script, false,
filename, lineno);
JSStringRef js_script =
JSStringCreateWithUTF8CString(massaged_script.c_str());
JSStringRef src_url =
(filename && *filename) ? JSStringCreateWithUTF8CString
(filename) : NULL;
JSObjectRef result = JSObjectMakeFunction(
ctx->GetContext(), NULL, 0, NULL, js_script, src_url, lineno,
exception);


I thought massager is a pre-compiler, but
when I delete the MassageJScript() and use script instead of
massaged_script.c_str(), everything is OK.
So what does MassageJscript do exactly?

Thanks very much.

James Su

unread,
Dec 7, 2009, 10:06:14 PM12/7/09
to google-gadgets...@googlegroups.com
Massager is just used for converting some Microsoft JScript specific code to standard JavaScript. It'll do nothing for standard JavaScript code.

- James Su

2009/12/8 wenbin wang <wbwan...@gmail.com>

--

You received this message because you are subscribed to the Google Groups "google-gadgets-for-linux-user" group.
To post to this group, send email to google-gadgets...@googlegroups.com.
To unsubscribe from this group, send email to google-gadgets-for-l...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-gadgets-for-linux-user?hl=en.



Reply all
Reply to author
Forward
0 new messages