mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Add missing JSAutoRequest calls. (hopefully all of them have been spotted now)
Patch by echotangoecho, refs #4053 This was SVN commit r18730.
This commit is contained in:
@@ -91,8 +91,11 @@ JS::Value JSI_VFS::BuildDirEntList(ScriptInterface::CxPrivate* pCxPrivate, const
|
||||
|
||||
int flags = recurse ? vfs::DIR_RECURSIVE : 0;
|
||||
|
||||
JSContext* cx = pCxPrivate->pScriptInterface->GetContext();
|
||||
JSAutoRequest rq(cx);
|
||||
|
||||
// build array in the callback function
|
||||
BuildDirEntListState state(pCxPrivate->pScriptInterface->GetContext());
|
||||
BuildDirEntListState state(cx);
|
||||
vfs::ForEachFile(g_VFS, path, BuildDirEntListCB, (uintptr_t)&state, filter, flags);
|
||||
|
||||
return OBJECT_TO_JSVAL(state.filename_array);
|
||||
|
||||
Reference in New Issue
Block a user