| 322 | } |
| 323 | |
| 324 | void ProcessorWithScriptingContent::defaultControlCallbackIdle(ScriptingApi::Content::ScriptComponent *component, const var& controllerValue, Result& r) |
| 325 | { |
| 326 | ScopedValueSetter<bool> objectConstructorSetter(allowObjectConstructors, true); |
| 327 | |
| 328 | int callbackIndex = getControlCallbackIndex(); |
| 329 | |
| 330 | if (auto scriptEngine = thisAsJavascriptProcessor->getScriptEngine()) |
| 331 | { |
| 332 | LockHelpers::SafeLock sl(getMainController_(), LockHelpers::Type::ScriptLock); |
| 333 | |
| 334 | scriptEngine->maximumExecutionTime = HiseJavascriptEngine::getDefaultTimeOut(); |
| 335 | |
| 336 | #if ENABLE_SCRIPTING_BREAKPOINTS |
| 337 | thisAsJavascriptProcessor->breakpointWasHit(-1); |
| 338 | #endif |
| 339 | |
| 340 | scriptEngine->setCallbackParameter(callbackIndex, 0, component); |
| 341 | scriptEngine->setCallbackParameter(callbackIndex, 1, controllerValue); |
| 342 | scriptEngine->executeCallback(callbackIndex, &r); |
| 343 | |
| 344 | } |
| 345 | |
| 346 | BACKEND_ONLY(if (!r.wasOk()) debugError(dynamic_cast<Processor*>(this), r.getErrorMessage())); |
| 347 | } |
| 348 | |
| 349 | |
| 350 |
no test coverage detected