mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 10:43:44 +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:
@@ -845,11 +845,10 @@ bool ScriptInterface::LoadScript(const VfsPath& filename, const std::string& cod
|
||||
options.setFileAndLine(filenameStr.c_str(), lineNo);
|
||||
options.setCompileAndGo(true);
|
||||
|
||||
JS::RootedFunction func(m->m_cx,
|
||||
JS_CompileUCFunction(m->m_cx, global, NULL, 0, NULL,
|
||||
reinterpret_cast<const char16_t*>(codeUtf16.c_str()), (uint)(codeUtf16.length()), options)
|
||||
);
|
||||
if (!func)
|
||||
JS::RootedFunction func(m->m_cx);
|
||||
JS::AutoObjectVector emptyScopeChain(m->m_cx);
|
||||
if (!JS::CompileFunction(m->m_cx, emptyScopeChain, options, NULL, 0, NULL,
|
||||
reinterpret_cast<const char16_t*>(codeUtf16.c_str()), (uint)(codeUtf16.length()), &func))
|
||||
return false;
|
||||
|
||||
JS::RootedValue rval(m->m_cx);
|
||||
|
||||
Reference in New Issue
Block a user