mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Minor scripting-related fixes
This commit is contained in:
parent
5cf32a968c
commit
1ad1aee11f
4 changed files with 7 additions and 5 deletions
|
@ -7570,7 +7570,7 @@ void Application::registerScriptEngineWithApplicationServices(const ScriptManage
|
|||
scriptEngine->registerGlobalObject("UserActivityLogger", DependencyManager::get<UserActivityLoggerScriptingInterface>().data());
|
||||
scriptEngine->registerGlobalObject("Users", DependencyManager::get<UsersScriptingInterface>().data());
|
||||
|
||||
scriptEngine->registerGlobalObject("GooglePoly", DependencyManager::get<GooglePolyScriptingInterface>().data());
|
||||
//scriptEngine->registerGlobalObject("GooglePoly", DependencyManager::get<GooglePolyScriptingInterface>().data());
|
||||
|
||||
if (auto steamClient = PluginManager::getInstance()->getSteamClientPlugin()) {
|
||||
scriptEngine->registerGlobalObject("Steam", new SteamScriptingInterface(scriptManager.get(), steamClient.get()));
|
||||
|
|
|
@ -432,17 +432,18 @@ void ScriptManager::waitTillDoneRunning(bool shutdown) {
|
|||
while (workerThread->isRunning()) {
|
||||
// If the final evaluation takes too long, then tell the script engine to stop running
|
||||
auto elapsedUsecs = usecTimestampNow() - startedWaiting;
|
||||
// V8TODO: temporarily increased script timeout. Maybe use different timeouts for release and unoptimized debug?
|
||||
static const auto MAX_SCRIPT_EVALUATION_TIME = USECS_PER_SECOND;
|
||||
if (elapsedUsecs > MAX_SCRIPT_EVALUATION_TIME) {
|
||||
workerThread->quit();
|
||||
|
||||
if (_engine->isEvaluating()) {
|
||||
qCWarning(scriptengine) << "Script Engine has been running too long, aborting:" << getFilename();
|
||||
qCWarning(scriptengine) << "Script Engine has been running too long (evaluation), aborting:" << getFilename();
|
||||
_engine->abortEvaluation();
|
||||
} else {
|
||||
auto context = _engine->currentContext();
|
||||
if (context) {
|
||||
qCWarning(scriptengine) << "Script Engine has been running too long, throwing:" << getFilename();
|
||||
qCWarning(scriptengine) << "Script Engine has been running too long (event loop), throwing:" << getFilename();
|
||||
context->throwError("Timed out during shutdown");
|
||||
}
|
||||
}
|
||||
|
@ -451,6 +452,7 @@ void ScriptManager::waitTillDoneRunning(bool shutdown) {
|
|||
// flooding it with aborts/exceptions will persist it longer
|
||||
static const auto MAX_SCRIPT_QUITTING_TIME = 0.5 * MSECS_PER_SECOND;
|
||||
if (!workerThread->wait(MAX_SCRIPT_QUITTING_TIME)) {
|
||||
Q_ASSERT(false);
|
||||
workerThread->terminate();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -408,7 +408,7 @@ ScriptEngineV8::ScriptEngineV8(ScriptManager* scriptManager) :
|
|||
// --jitless - might improve debugging performance due to no JIT?
|
||||
// --assert-types
|
||||
|
||||
v8::V8::SetFlagsFromString("--stack-size=256");
|
||||
v8::V8::SetFlagsFromString("--stack-size=256 --verify-heap");
|
||||
//v8::V8::SetFlagsFromString("--stack-size=256 --single-threaded");
|
||||
v8::Platform* platform = getV8Platform();
|
||||
v8::V8::InitializePlatform(platform);
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
if (remainingTime < FADE_OUT_DURATION) {
|
||||
alpha = NOTIFICATION_ALPHA * (remainingTime/FADE_OUT_DURATION);
|
||||
}
|
||||
var properties, count, extraline, breaks, height;
|
||||
var properties, count, extraLine, breaks, height;
|
||||
var breakPoint = MAX_LINE_LENGTH + 1;
|
||||
var level = overlayLocationY;
|
||||
var entityLevel = 0;
|
||||
|
|
Loading…
Reference in a new issue