mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-14 07:17:44 +00:00
Fix missing JSAutoRequest before JS_ReportError in various commits.
Differential Revision: https://code.wildfiregames.com/D2256 Tested on: clang 8.0.1, Jenkins This was SVN commit r22949.
This commit is contained in:
@@ -228,10 +228,9 @@ bool JSI_VFS::PathRestrictionMet(ScriptInterface::CxPrivate* pCxPrivate, const s
|
||||
allowedPaths += L"\"" + validPaths[i] + L"\"";
|
||||
}
|
||||
|
||||
JS_ReportError(
|
||||
pCxPrivate->pScriptInterface->GetContext(),
|
||||
"This part of the engine may only read from %s!",
|
||||
utf8_from_wstring(allowedPaths).c_str());
|
||||
JSContext* cx = pCxPrivate->pScriptInterface->GetContext();
|
||||
JSAutoRequest rq(cx);
|
||||
JS_ReportError(cx, "This part of the engine may only read from %s!", utf8_from_wstring(allowedPaths).c_str());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user