Revert use of the isRunOnce flag after removal in 64b477625d of compile'n go, refs #4893.

This breaked a SM assertion, which was only caught in debug mode. It
could have led to subtle bugs during the compilation of JS scripts.
Still set the flag to its default value, because SM devs wanted to
change the default in the future.

This was SVN commit r22629.
This commit is contained in:
Itms
2019-08-08 09:05:42 +00:00
parent 64b477625d
commit 9325992232
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -864,7 +864,7 @@ bool ScriptInterface::LoadScript(const VfsPath& filename, const std::string& cod
JS::CompileOptions options(m->m_cx);
options.setFileAndLine(filenameStr.c_str(), lineNo);
options.setIsRunOnce(true);
options.setIsRunOnce(false);
JS::RootedFunction func(m->m_cx);
JS::AutoObjectVector emptyScopeChain(m->m_cx);