mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-28 01:33:38 +00:00
SpiderMonkey 38 upgrade: 18/35
Renamed JS_Compile{,UC}Function to JS::CompileFunction. Patch by leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1089026
This was SVN commit r18672.
This commit is contained in:
@@ -414,11 +414,13 @@ void IGUIObject::RegisterScriptHandler(const CStr& Action, const CStr& Code, CGU
|
||||
options.setFileAndLine(CodeName.c_str(), 0);
|
||||
options.setCompileAndGo(true);
|
||||
|
||||
JS::RootedFunction func(cx, JS_CompileFunction(cx, globalObj,
|
||||
buf, paramCount, paramNames, Code.c_str(), Code.length(), options));
|
||||
|
||||
if (!func)
|
||||
return; // JS will report an error message
|
||||
JS::RootedFunction func(cx);
|
||||
JS::AutoObjectVector emptyScopeChain(cx);
|
||||
if (!JS::CompileFunction(cx, emptyScopeChain, options, buf, paramCount, paramNames, Code.c_str(), Code.length(), &func))
|
||||
{
|
||||
LOGERROR("RegisterScriptHandler: Failed to compile the script for %s", Action.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
JS::RootedObject funcObj(cx, JS_GetFunctionObject(func));
|
||||
SetScriptHandler(Action, funcObj);
|
||||
|
||||
Reference in New Issue
Block a user